Page 1 of 1

Migration tool?

Posted: Sun Oct 09, 2016 10:42 pm
by rajasegar
Does Nagios have any tools or scripts to migrate selected servers with its services and dependencies like contacts etc from one server to another?

Thanks

Re: Migration tool?

Posted: Mon Oct 10, 2016 9:40 am
by lmiltchev
Are you looking for *something different* than "backing up and restoring XI" as described in our the document below?
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Can you elaborate?

Re: Migration tool?

Posted: Mon Oct 10, 2016 6:43 pm
by rajasegar
lmiltchev wrote:Are you looking for *something different* than "backing up and restoring XI" as described in our the document below?
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Can you elaborate?
I am trying to move about 300 hosts out of 1 instance to another in small batches.

Re: Migration tool?

Posted: Tue Oct 11, 2016 9:28 am
by lmiltchev
If you knew you didn't have any config errors, you could simply place your configs in the "/usr/local/nagios/etc/import" directory, and run reconfigure_nagios.sh:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Note: This *may* fail if you hit some config errors. For example, it is possible that on the "new" server you haven't defined some of the objects used in the configs that you are importing, i.e hostgroups, contacts, contactgroups, etc.

A better way would be to create a directory under "/usr/local/nagios/etc"

Code: Select all

mkdir /usr/local/nagios/etc/cfgprep
copy the configs in it, and import them from the Nagios XI web UI (CCM->Tools->Import Config Files). This way you could verify configuration prior to applying it.

Run the " Config File Management" tool (called "Write Config Files" tool in XI versions older than 5.3.0) after importing each batch to make sure you don't have any config errors. If they are no errors, apply configuration. If you see errors, fix them in the CCM, rerun the tool, and apply configuration if no errors are present.

Re: Migration tool?

Posted: Tue Oct 11, 2016 6:20 pm
by rajasegar
lmiltchev wrote:If you knew you didn't have any config errors, you could simply place your configs in the "/usr/local/nagios/etc/import" directory, and run reconfigure_nagios.sh:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Note: This *may* fail if you hit some config errors. For example, it is possible that on the "new" server you haven't defined some of the objects used in the configs that you are importing, i.e hostgroups, contacts, contactgroups, etc.

A better way would be to create a directory under "/usr/local/nagios/etc"

Code: Select all

mkdir /usr/local/nagios/etc/cfgprep
copy the configs in it, and import them from the Nagios XI web UI (CCM->Tools->Import Config Files). This way you could verify configuration prior to applying it.

Run the " Config File Management" tool (called "Write Config Files" tool in XI versions older than 5.3.0) after importing each batch to make sure you don't have any config errors. If they are no errors, apply configuration. If you see errors, fix them in the CCM, rerun the tool, and apply configuration if no errors are present.
I am aware of this method. Thanks anyway.
Please close this thread.

Re: Migration tool?

Posted: Wed Oct 12, 2016 9:15 am
by dwhitfield
Glad to hear you have a method. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!