- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
07-17-2013 03:21 PM
Hi,
how can we see the admins already logged in to Panorama
when we use show admins or Dahsboard it is hard to count.There are many admins we just need number of admins logged in realtime.
07-17-2013 04:40 PM
You can use the RESTAPI. Here is one method:
The username and password for this firewall is 'admin'.
First, get an API key:
curl --insecure https://10.30.1.131/api/?type=keygen\&user='admin'\&password='admin'
Which returns:
<response status = 'success'><result><key>LUFRPT14MW5xOEo1R09KVlBZNnpnemh0VHRBOWl6TGM9bXcwM3JHUGVhRlNiY0dCR0srNERUQT09</key></result></response>
Second, take the key and use it in the following query:
curl --insecure https://10.30.1.131/api/?type=op\&key=LUFRPT14MW5xOEo1R09KVlBZNnpnemh0VHRBOWl6TGM9bXcwM3JHUGVhRlNiY0...'<show><admins></admins></show>' | sed 's/<entry>/\'$'\n/g' | wc
This will give you the number of admins currently logged in. The sed command is just looking for the "<entry>" tag and replacing it with a new line so we can then pipe the output to 'wc' (counts lines).
Currently there is no way to just get a count from the GUI or command line. You can use the API from a web browser too, I just chose the use curl in this example so I could manipulate the output for a simple count.
Hope this helps!
-chadd.
07-18-2013 09:01 AM
Thanks for reply
can we use sed 's/<entry>/\'$'\n/g' | wc also with web browser API, I tried the link it did now work firs but after I have to clear some " \" to see the logged in admins.it worked.
for the count maybe I have to edit that somehow....
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!