Nagios Manage users
-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Nagios Manage users
Hello Team,
Is there a way to export users that we have under (Admin -> Users -> Manage Users) to excel/pdf with the settings/permissions they have been configured?
Is there a way to export users that we have under (Admin -> Users -> Manage Users) to excel/pdf with the settings/permissions they have been configured?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios Manage users
You would need to sculpt a command to pull them from the postgres database. You can also view their permissions in the following file:
Code: Select all
/usr/local/nagios/etc/cgi.cfg-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Re: Nagios Manage users
Great!
Do we have any document / instruction to pull that info from Postgres?
Do we have any document / instruction to pull that info from Postgres?
Re: Nagios Manage users
I've never found any solid documentation but can give you this information...sureshkraj2012 wrote:Great!
Do we have any document / instruction to pull that info from Postgres?
You can dump the nagiosxi user table with this command.
Code: Select all
echo "SELECT * FROM xi_users" | psql -U nagiosxiCode: Select all
psql -U nagiosxiCode: Select all
nagiosxi=> select * from xi_users;
user_id | username | password | name | email | backend_ticket | enabled
---------+--------------------+----------------------------------+----------------------------+------------------------------------+------------------------------------------------------------------+---------
59 | jwhite | a176b5e115197a1454b0ed36e6c32d5e | Jack White | [email protected] | fqg876mp6utc8dpd66mvfg04l60d8u4kmjqqogjrce5kqtut2irg3pjluh24e3o2 | 1
Code: Select all
select keyname,keyvalue from xi_usermeta where user_id='59';
and just do joins off user_id across the xi_users and xi_usermeta tables.
----------------------
Nagios Jedi in training.
Nagios Jedi in training.
Re: Nagios Manage users
We generally don't provide documentation for the backend database stuff, because if we did that and someone made a mistake things can get *seriously* broken very fast. We usually prefer for people to submit a feature request or worst case have us craft a reply we know to be safe. That said, follow technick's advice and run the describe and select on the tables. They are not incredibly complicated and that select all should get you what you need.
Former Nagios employee
Re: Nagios Manage users
tmcdonald is a gazillion times correct with this... mucking around in the database can break your environment if mistakes are made.. Which is why I recommend double.. no triple checking your backups exist and are good plus do all of your development of this stuff in a test environment.tmcdonald wrote:We generally don't provide documentation for the backend database stuff, because if we did that and someone made a mistake things can get *seriously* broken very fast. We usually prefer for people to submit a feature request or worst case have us craft a reply we know to be safe. That said, follow technick's advice and run the describe and select on the tables. They are not incredibly complicated and that select all should get you what you need.
Also make sure you know how to reload the nagios xi backups in case of an emergency.
----------------------
Nagios Jedi in training.
Nagios Jedi in training.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios Manage users
Yep, be very careful, nagios sources a lot of data from the MySQL and PostgresQL databases on your server.
-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Re: Nagios Manage users
Got it. Thank you 
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios Manage users
Yep!
Are we all good to lock this up? Or do you have followup questions on this topic?