Closed tom0010 closed 3 years ago
:tada: Thanks for opening your first issue here! Welcome to the community!
As a test, I switched over to using just python requests
. I'm still getting some timeouts but no where near as many.
09:57:01,529 root DEBUG OrderedDict([('response', OrderedDict([('@status', 'unauth'), ('@code', '22'), ('msg', OrderedDict([('line', 'Session timed out')]))]))])
Not sure if you would like to investigate further or not. Happy to send more info if needed.
Hi @tom0010, sorry for the slow response, and happy holidays. Since this is happening outside the pan-os-python library, I recommend to open a TAC case to investigate. The PAN-OS API is a TAC supported product and they can look into why your sessions are timing out.
I'll close this issue for now, since it doesn't seem specific to the pan-os-python library. Thanks for following up.
Describe the bug
I have a script that is monitoring the CPU cores in a PA device using the API call. This gets executed every 10 seconds or so, and I think the sessions are not closing cleanly, therefore that is why I think I am seeing this issue. I tried to look through the code but I couldn't see anything about a disconnect. In Netmiko for example, there is a function to disconnect the session. Now, I'm not sure if that is even needed here but I am lost if that is not the case.
Expected behavior
For the device to not timeout.
Current behavior
I am getting:
Possible solution
Add a function to gracefully disconnect the session.
Steps to reproduce
Run every 10-30 seconds:
I'm currently using telegraf to execute this multiple times.
Context
Trying to monitor DP cores and put the info into a timeseries DB.
Your Environment