Export config files

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Export config files

Post 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.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Export config files

Post 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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Export config files

Post by dwhitfield »

@gormank is correct, but if you like PDFs, here you go: https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Locked