Export config files
Export config files
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.
Then go to the other XI instance and browse for the exported file to import.
Re: Export config files
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.
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
@gormank is correct, but if you like PDFs, here you go: https://assets.nagios.com/downloads/nag ... ios-XI.pdf