Page 1 of 1

Copying Config from one Server to Another

Posted: Thu May 14, 2015 4:49 am
by Brick
I have two identical Nagios servers and wish to export the config from one to another.

Both are running the Centos VMware 64bit version

I have tried copying the latest snapshot from one server to the other and then restoring it, and running an import through the core config manager…

When I go into the core config manager I can see all of my hosts, and services, they are all set to active and the status is applied and I have restarted the server.

But when I go to the homepage the only server that is showing up is the default localhost one, there are no other groups or servers.

Re: Copying Config from one Server to Another

Posted: Thu May 14, 2015 10:14 am
by lmiltchev
Were you able to apply configuration successfully? Do you get any config errors, when you run the Write Config Tool?

CCM->Write Config Files->Write->Verify

Is this a source install or one of our VMs? What version of Nagios XI are you using?

Re: Copying Config from one Server to Another

Posted: Thu May 14, 2015 10:35 am
by Brick
This is the VM version, 4.0.8

Hmmmm, it looks like I'm getting millions of duplicate warnings...

Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'Disk - Average Logical Disk Queue Length R' on host 'ALHIMSS01' (config file '/usr/local/nagios/etc/services/Windows Servers.cfg', starting on line 81)
Warning: Duplicate definition found for service 'Disk - Average Logical Disk Queue Length R' on host 'NBUMAS02' (config file '/usr/local/nagios/etc/services/Windows Servers.cfg', starting on line 81)
Warning: Duplicate definition found for service 'Disk - Average Logical Disk Queue Length R' on host 'ORCRIS02' (config file '/usr/local/nagios/etc/services/Windows Servers.cfg', starting on line 81)
Warning: Duplicate definition found for service 'Disk - Average Logical Disk Queue Length S' on host 'NBUMAS02' (config file '/usr/local/nagios/etc/services/Windows Servers.cfg', starting on line 99)
Warning: Duplicate definition found for service 'Disk - Average Logical Disk Queue Length S' on host 'SECSPM02' (config file '/usr/local/nagios/etc/services/Windows Servers.cfg', starting on line 99)
Warning: Duplicate definition found for service 'Disk - Logical Disk Split IO-Sec R' on host 'ALHIMSS01' (config file '/usr/local/nagios/etc/services/Windows Servers.cfg', starting on line 173)

Re: Copying Config from one Server to Another

Posted: Thu May 14, 2015 12:48 pm
by lmiltchev
Warnings won't cause apply configuration to fail.

Did you actually apply configuration after clicking on the "Verify" button?
example01.PNG
example02.PNG

Re: Copying Config from one Server to Another

Posted: Fri May 15, 2015 3:46 am
by Brick
Yes, the configuration has been applied

Re: Copying Config from one Server to Another

Posted: Fri May 15, 2015 5:34 am
by Brick
I tried deleting all of the hosts and services and importing them again but the same issue is happening.

I'm thinking of just flattening the machine and starting again to be honest- I really need to get this working!

Is there a better process for copying the config from one server to another?

Re: Copying Config from one Server to Another

Posted: Fri May 15, 2015 7:49 am
by lmiltchev
I you would like to migrate XI to a new server (move ALL of the configs), you could following this document:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

You will need to:

1. Backup the "old" server
2. Perform a fresh, clean install of XI on the "new" server (preferably the same OS/architecture/XI version)
3. Move the backup created in step one to the new server
4. Restore from the backup, following the document above

If you need to import SOME of the configs, you can follow this document:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Copying Config from one Server to Another

Posted: Tue May 19, 2015 9:15 am
by Brick
Yeah that's worked fine

Thanks!

Re: Copying Config from one Server to Another

Posted: Tue May 19, 2015 9:58 am
by lmiltchev
Great! I am glad I could help!

I will be locking this topic. If you have any more questions/issues, please start a new thread.