User report / dump / export with Security Settings - how?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
stefanw
Posts: 28
Joined: Thu Jul 10, 2014 1:54 pm
Contact:

User report / dump / export with Security Settings - how?

Post by stefanw »

Hi all --

I'm looking to do something similar to what was brought up in at least two previous topics:
https://support.nagios.com/forum/viewto ... 16&t=34671
https://support.nagios.com/forum/viewto ... 16&t=38794

At a minimum I need to be able to get:
- username
- admin or user
- Can (re)configure hosts and services? yes/no
- Can control all objects? yes/no
- Can see/control monitoring engine? yes/no
- Can access advanced features? yes/no
- Has API access? yes/no

In the near term (until that cited feature request ID 8787 gets handled) I'd be satisfied with being able to dump out from the database, but we're on MySQL so the psql example from that topic doesn't apply.

By the way I can get some value from parsing the "authorized_for_" entries in /usr/local/nagios/etc/cgi.cfg but I'm fairly sure that is not the complete picture.

Can someone supply me with a MySQL CLI query to accomplish this?

By the way we're on XI 5.5.5, MySQL 5.1.73, on RHEL & CentOS 6.10.

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

Re: User report / dump / export with Security Settings - how

Post by npolovenko »

Hello, @stefanw. Nagios uses two queries to pull users information.
#1
echo "SELECT * FROM xi_users\G;" | mysql -uroot -pnagiosxi nagiosxi
#2
echo "SELECT * FROM xi_usermeta\G;" | mysql -uroot -pnagiosxi nagiosxi
Query number 2 doesn't show the actual usernames and is using user_id from the first query.


It may be easier to parse the information from the cgi.cfg file.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked