Method to list active Nagios XI users and activity

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Method to list active Nagios XI users and activity

Post by awilson »

Hi. Is there a way to list the current Nagios XI users and their activity?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Method to list active Nagios XI users and activity

Post by npolovenko »

@awilson, There is a way to list all XI users via the API command:
You'll need to replace my API key with yours.

As far as the user activity goes, you can view some of it in the Event Log. (Homepage -> bottom of the left column).
But it would be limited to Acknowledgments and Downtime. Any modifications to the host/service configs in the CCM are not associated with the users' activity and not logged. That is something we're looking into adding in the future.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Re: Method to list active Nagios XI users and activity

Post by awilson »

Thanks!
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Re: Method to list active Nagios XI users and activity

Post by awilson »

Thank you for the API reference. The information I'm trying to get is who are the active logged on users to the Nagios XI platform. I didn't see an endpoint for that. Is that information in one of the databases?

Thanks!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Method to list active Nagios XI users and activity

Post by npolovenko »

@awilson, You could look into the xi_session table in the database and match active sessions with the user ID's.
echo "SELECT * FROM xi_sessions\G;" | mysql -uroot -pnagiosxi nagios
Or you could use this query to get the last login time for the users:
echo "SELECT * FROM xi_users\G;" | mysql -uroot -pnagiosxi nagiosxi
Other than that I can't think of anything.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Re: Method to list active Nagios XI users and activity

Post by awilson »

Thank you. This is a great help. You can close this topic.

Cheers.
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Re: Method to list active Nagios XI users and activity

Post by awilson »

I was too fast. xi_sessions must be in PostgreSQL on my system. We are on 5.4.4
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Method to list active Nagios XI users and activity

Post by lmiltchev »

With postgres, you can use the following command instead:

Code: Select all

echo "SELECT * FROM xi_users\G;" | psql nagiosxi nagiosxi
Be sure to check out our Knowledgebase for helpful articles and solutions!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Method to list active Nagios XI users and activity

Post by npolovenko »

@awilson, I checked the database tables on the XI 5.4.12 and didn't see the xi_sessions either. On the XI 5.5 the table is present. Here's the PSQL version of the second query that I gave you:
echo "SELECT * FROM xi_users\G;" | psql nagiosxi nagiosxi
Can you go to the Admin menu, then click on Manage users in the left column and see if the "Last Login" column is populated with timestamps?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked