Page 1 of 1
duplicating config from Xi to another XI
Posted: Mon Apr 12, 2021 5:06 am
by TethiS
Hi,
I'm looking for a way of exporting/importing the configuration from a NagiosXI to another NagiosXI.
So far I've found the docs explaining how to import from Nagios Core to NagiosXI (using preparation prior to the actual import).
For nagiosXI to NagiosXI would it be different, maybe a simpler and straightforwards way? Like just copying the cfg files and applying "Import" in the "Import Config Files" wizard?
Thanks,
Sebastian
Re: duplicating config from Xi to another XI
Posted: Mon Apr 12, 2021 1:19 pm
by gsmith
Hi,
Please follow the import procedure described in the guide below:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Since you going from one XI server to another, the prep tool is not required but, remember that you need to import the configs in order. The order is shown in a pop-up when you select the
"Import Config Files" from the "Tools" menu group.
Commands >> Time Periods >> Contact Templates >> Contacts >> Contact Groups >> Host Templates >> Hosts >> Host Groups >> Service Templates >> Services >> Service Groups
Thanks.
Re: duplicating config from Xi to another XI
Posted: Tue Apr 13, 2021 2:36 am
by TethiS
Cool, that sounds like what I was initially thinking too.
One additional question thou. I don't have a hosts.cfg file, but a bunch of <hostname.cfg> files in a subfolder named hosts/ in etc/.
Do I need to go one by one or is the wizard capable of working with multiple hosts selection ?
Thanks.
Re: duplicating config from Xi to another XI
Posted: Tue Apr 13, 2021 10:24 am
by benjaminsmith
Hi TethiS,
For Nagios XI, each host has to have a separate file ( Nagios Core doesn't; care and that's why there is the import prep tool). However, there's no need to do each separately, you can put all the hosts file in the import directory and then move to the next object type.
I would recommend running any
apply configuration from the CLI after each object type for troubleshooting as it's easier to catch any errors.
Code: Select all
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
This can also be done in the GUI, by going to Configure > CCM > Tools > Import Config FIles
Hope that helps. Let us know if you have more questions.
Benjamin
Re: duplicating config from Xi to another XI
Posted: Wed Apr 14, 2021 3:24 am
by TethiS
Thanks Benjamin,
I just copied the content of donor etc/ folder to etc/cfgprep/ of the receiver then went in the Wizard of importing on the receiver nagiosXI and did the importing of files in the suggested order.
It went ok, without errors.
Only thing to notice is that the services/hosts marked as Inactive (donor side) are not migrated and the existing stuff on the receiver side it is not deleted, which is probably the desired behavior.
Thanks for the assistance !
Re: duplicating config from Xi to another XI
Posted: Wed Apr 14, 2021 9:39 am
by benjaminsmith
Hello TethiS,
Glad to hear that worked out. On the donor side, anything marked as inactive would not be written out into cfg files, but will remain in the database.
Also, if you are finished with the transfers, make sure the import directory is empty.
Let us know if you need anything else or if it's okay to close this topic.
Regards,
Benjamin
Re: duplicating config from Xi to another XI
Posted: Fri Apr 16, 2021 9:43 am
by TethiS
Thanks Benjamin,
All is fine now.
You can close this topic.
Best Regards!
Re: duplicating config from Xi to another XI
Posted: Fri Apr 16, 2021 10:00 am
by benjaminsmith
Hi TethiS,
Excellent! We'll close this out.
Have a great weekend!