Page 1 of 1
Importing User from previous environment
Posted: Fri May 24, 2019 11:02 am
by jonatgil
Hello,
Currently transferring an Old nagios environement to a new one. Both of them are on the latest version.
Was able to connect to the server and take the backup of the sql for the user with the other old psot from the site.
No one talk about import the SQL dump into the database.
I guess that I delete the nagiosadmin from the dump file.
Do I need to import just xi_users? or I need to also import xi_usermeta?
After that I transfer the pass file to the new server?
/usr/local/nagiosxi/etc/htpasswd.users.
Would like to avoid having to type in 200 users...
Thank you.
Re: Importing User from previous environment
Posted: Fri May 24, 2019 11:08 am
by benjaminsmith
Hi
@jonatgil,
I would recommend using the backup and restore feature in Nagios XI as it will transfer everything to the new server.
Please see this guide for directions:
Backing Up And Restoring Your Nagios XI System
Let me know if you have any questions.
Re: Importing User from previous environment
Posted: Fri May 24, 2019 11:23 am
by jonatgil
The backup/restore is not an option since the purpose of the new environment was to clean/organised the host in a logical ways. Compare to defining individual check for everything with different threshold.
edit: the new environment is completed, the only thing left is user.
Re: Importing User from previous environment
Posted: Fri May 24, 2019 12:16 pm
by benjaminsmith
Hi
@jonatgil,
One thing to note, the configuration data is not stored in the nagiosx database, but in nagiosql. So you either have the option to the import xi_users and xi_meta tables or bring over the entire nagiosxi database along with /usr/local/nagiosxi/etc/htpasswd.users.
Re: Importing User from previous environment
Posted: Fri May 24, 2019 12:46 pm
by jonatgil
NagiosQL is a web based configurator for Nagios Core. ???
We are not in the same environement...
I'm on Nagios XI.
The following command return me the user from the MYSQL/Maria database
mysql -u root -pXXXX
use nagiosxi;
select user_id , username , name , email , enabled from xi_users;
Since I don't need the phone number I don't do the join from the command of the previous post.
edit: Nevermind I jsut saw a nagiosql database on a nagiosXI environement. Strange...
edit2 :nagiosql database -> table ->tbl_user only have two users. pretty sure it's not in there.
Re: Importing User from previous environment
Posted: Fri May 24, 2019 1:15 pm
by benjaminsmith
Nagios XI actually uses 3 databases - nagios, nagiosql and nagiosxi.
The nagiosql contains the running configuration from the CCM and this will have core contacts but not XI Users ( those who have access to the Nagios XI web interface).