Page 1 of 3

Changing Nagios XI Server IP

Posted: Tue Oct 01, 2013 7:52 pm
by toleolu
As we move forward with upgrading from an existing Nagios 1.1 system to Nagios XI, the idea has been floated that rather than pushing out clients and going through a lot of reconfiguring, we would be better off just changing the IP of the new server to match the old one. We've already imported the config files from the old Nagios, everything is there except the services, which those should appear once we switch the IP's. Everything is pinging on the new server so there shouldn't be any issues getting the old installed clients seeing the new server.

In addition to the servers, we're monitoring about 150 switches, UPS's, EMU's and other devices that are scattered all around the Hawaiian Islands. Most of them require a serial port connection to modify the agents, so that would require a lot of travel or shipping equipment around, basically a huge pain in the okole!!! (That's Hawaiian for butt :D :D )

So we were thinking we would just switch the IP's, get everything monitored on the new Nagios Server, then move forward with pushing out updated clients and tweaking things to take advantage of enhanced capabilities as we move along.

Do you guys see any problems or gotcha's with this plan???

Mahalo;

Charles

Re: Changing Nagios XI Server IP

Posted: Wed Oct 02, 2013 12:03 am
by tmcdonald
I did basically what you are doing right now once and it worked out fine, however I did not also upgrade to a newer version. The config files shouldn't really need to be any different, however you might want to look out for firewall rules, SSH passwords (for checks), and anything else on the new system that might have been set up on the old.

Re: Changing Nagios XI Server IP

Posted: Wed Oct 02, 2013 12:01 pm
by toleolu
Cool, thanks.

We'll pull the trigger on this today and see what breaks. I'm sure you'll be hearing from us later.

Mahalo

Re: Changing Nagios XI Server IP

Posted: Wed Oct 02, 2013 2:24 pm
by scottwilkerson
Let us know if you run into any issues.

One thing I can think of, if you have agents on machines that have allowed IP's specified you will need to add the new XI servers IP address

e.g.
Linux agent run under xinetd edit only_from field of /etc/xinetd.d/nrpe
Windows, edit allowed_hosts in nsclient.ini

Re: Changing Nagios XI Server IP

Posted: Wed Oct 02, 2013 5:40 pm
by toleolu
By us changing the IP address of the Nagios XI server to match the current old Nagios, we shouldn't have to change the allowed IP's in the agent should we?

(The old Nagios server will be shut down when we do this.)

Re: Changing Nagios XI Server IP

Posted: Thu Oct 03, 2013 10:01 am
by slansing
As long as the XI address is the exact same as it was with core you will not need to point the agent's to another address.

Re: Changing Nagios XI Server IP

Posted: Fri Oct 04, 2013 6:32 pm
by toleolu
Well, that didn't work.

I changed IP on the new Nagios XI server to match the IP address of the old Nagios server, pulled the network cable out of the old server, and waited. After about half an hour with none of the services showing up on the new server I put everything back as it was and brought the old system online.

One thing that always bothered me after importing the .cfg files from the old system was that services never showed up under the hosts on the new system. If everything had gone correctly with importing the .cfg files, shouldn't I have seen the services on all the hosts under Service Detail? Granted they wouldn't be reporting anything but they still should be there shouldn't they?

The only way I can get services to show up on my hosts is to add them from CCM. I really don't want to have to go through and manually add services for nearly 500 hosts.

Any ideas what I might have missed?

Thanks

Re: Changing Nagios XI Server IP

Posted: Mon Oct 07, 2013 9:35 am
by tmcdonald
Let's drill down a bit.

What procedure did you use to get the configs over? Did you use the backup_xi.sh script, or did you manually copy over all the .cfg files? Or did you use the Configuration Import page?
Just to confirm, the hosts are showing up but the services are not?

Re: Changing Nagios XI Server IP

Posted: Mon Oct 07, 2013 6:27 pm
by toleolu
I used these documents:

http://assets.nagios.com/downloads/nagi ... p_Tool.pdf

http://assets.nagios.com/downloads/nagi ... nto_XI.pdf

I manually copied all the cfg files form the old server to the new putting them in /usr/local/nagios/etc/cfgprep/orig.

Yes the hosts and host groups show up, and they are pinging, just no services appear. I thought that was kind of strange when I first did it, but I figured they would show up when I changed the server IP. I was thinking the hosts report to the server rather than the sever querries the hosts

FYI, it's not a big issue to wipe this install and start fresh.

Thanks

Re: Changing Nagios XI Server IP

Posted: Tue Oct 08, 2013 12:53 pm
by slansing
I'd recommend using the backup and restore documentation to migrate from one XI server to another, it will take a lot of work out of manually plucking configs:
http://assets.nagios.com/downloads/nagi ... ing_XI.pdf