Page 1 of 1

Export config files

Posted: Tue Jul 25, 2017 2:50 pm
by jkinning
I do a lot of "new" checks on our Nagios XI test server. Is there a way that I can simply export the config and import it into our production XI instance? In the past I would just manually key the information into the host and service fields for each check but seeing I have things working and both test and production are running the same version there is probably a way I can export the items I want and import them into another XI instance. Is that possible? I looked around the different links but nothing stood out so not sure if there is different way using CLI but if not how would one open a feature enhancement request? This would be a good thing to have. Ability to export host and service from one XI instance to another by checking check boxes and clicking buttons. :D Then go to the other XI instance and browse for the exported file to import.

Re: Export config files

Posted: Tue Jul 25, 2017 3:28 pm
by gormank
All the host, service, etc. info is in /usr/local/nagios/etc/ and as long as any configs required such as templates, contacts, contact groups, etc. exist in the new system, you can for example, grab a host config file from one XI system, drop it in /usr/local/nagios/etc/import/ and run an apply config from CCM or run the reconfig script from the dir where it exists.

Here's an ugly way to run the reconfig script (no pushd/popd on my boxes).
dir=`pwd`; cd /usr/local/nagiosxi/scripts; ./reconfigure_nagios.sh; cd $dir

You can also create objects in the API, assuming your XI versions are pretty current.

Re: Export config files

Posted: Tue Jul 25, 2017 4:01 pm
by dwhitfield
@gormank is correct, but if you like PDFs, here you go: https://assets.nagios.com/downloads/nag ... ios-XI.pdf