logged in admin count Panorama

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

logged in admin count Panorama

L6 Presenter

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.

2 REPLIES 2

L3 Networker

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.

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....

  • 4841 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!