-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VPN Loggedin Users and Count #2
Comments
Just found this gem. It shows everyone logged in at the portal (to either download the client or whatever). You need to change the portal into the gateway as shown above, along with and a change into the counting code. Change all this in the sensor.py file, restart your entire Home Assistant host and it'll work. Like this: Also look for this piece:
Change the nodes rule into:
Tested this on PAN-OS 10.2 on a PA-220. It works. |
It appears that you are working with Palo Alto GlobalProtect and trying to retrieve information about connected users using the API. The API structure may vary between different versions of Palo Alto PAN-OS, and it's essential to use the appropriate API endpoint and XML structure for the version you're working with. In PAN-OS version 9.1, the correct XML structure for retrieving GlobalProtect user information should be as follows: <show>
<global-protect-gateway>
<current-user></current-user>
</global-protect-gateway>
</show> The structure you've provided appears to be correct based on the documentation you linked. The command should be valid for version 9.1. Here are a few things to check if you are not getting the expected results:
|
Having issues with the custom palo alto GP sensor. I am showing 0 users. The current command is successful but does not provide results because I believe that the show command requires the name of the portal and possibly the vsys.
Is the show command outdated for version 9?
Is it suppose to be:
<show><global-protect-gateway><current-user></current-user></global-protect-gateway></show>
As seen here:
https://docs.paloaltonetworks.com/pan-os/9-1/pan-os-panorama-api/pan-os-xml-api-use-cases/show-and-manage-globalprotect-users-api.html
Thanks,
Jon
The text was updated successfully, but these errors were encountered: