When we purchased Nagios XI originally, we purchased it as a company. Now that a division of our company is splitting off, we need to move their configuration files to their own Nagios XI install.
Is there a way to do this within Nagios XI? Specifically, we want to move host and service configs related to this division. What would be the easiest way to accomplish this?
Moving Nagios XI config files to new install
Re: Moving Nagios XI config files to new install
The only way to make sure *everything* gets moved is to do a manual backup and restore. This is less than ideal given your current situation, though.
If your divisions hosts/services were divided by hostgroups/servicegroups, I wrote a custom REST API endpoint a while back that gets all of the hosts in a given hostgroup:
https://support.nagios.com/forum/viewto ... 22#p243022
You could probably do something similar to get all the services in a given servicegroup. Once you've assembled that list of host and service objects, you could make a few REST API calls to get the full objects then feed those into the "destination" machine's REST API to write the configs.
The "easiest" way to do this is going to depend on your configuration organization. Specifically, what methods you've used to logically separate the individual divisions. The REST API is a pretty good "swiss army knife" for solving these sorts of problems. More info on Nagios XI's REST API can be found in the "Help" section of your Nagios XI GUI.remedsys wrote:What would be the easiest way to accomplish this?
If your divisions hosts/services were divided by hostgroups/servicegroups, I wrote a custom REST API endpoint a while back that gets all of the hosts in a given hostgroup:
https://support.nagios.com/forum/viewto ... 22#p243022
You could probably do something similar to get all the services in a given servicegroup. Once you've assembled that list of host and service objects, you could make a few REST API calls to get the full objects then feed those into the "destination" machine's REST API to write the configs.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Moving Nagios XI config files to new install
The easiest way to go about this would be to create a backup of your "old" Nagios XI server, install XI (same version on same OS/architecture) on the "new" server, copy your backup over to the new machine, and restore XI from it. The document below should get you started:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Next, you can delete all of the hosts/services, contacts, etc. that you don't need (from the "old" and from the "new" Nagios XI instance).
Important: Keep in mind that you will need a new license (one license per production server). Each Nagios XI license is approved for up to three installations: one primary monitoring/production, one backup/failover, and one test environment. As long as you are only using one install for production monitoring, you are within the boundaries of our licensing policy. Please contact our sales team at [email protected]. They can recommend the best license for you, depending on your specific needs.
Hope this helps.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Next, you can delete all of the hosts/services, contacts, etc. that you don't need (from the "old" and from the "new" Nagios XI instance).
Important: Keep in mind that you will need a new license (one license per production server). Each Nagios XI license is approved for up to three installations: one primary monitoring/production, one backup/failover, and one test environment. As long as you are only using one install for production monitoring, you are within the boundaries of our licensing policy. Please contact our sales team at [email protected]. They can recommend the best license for you, depending on your specific needs.
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!