Address change on switch

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ldigiuseppe
Posts: 1
Joined: Thu May 03, 2012 10:14 am

Address change on switch

Post by ldigiuseppe »

I was monitoring a Cisco switch with Nagios XI, and I later had to change the IP address of the switch. Is there a way to reflect the address change without deleting and re-adding the switch to Nagios? I don't want to lose all the configuration settings I had made for all the ports.

Thanks,
Leanne
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Address change on switch

Post by scottwilkerson »

Unfortunately there isn't an easy way to do this.

Best I could come up with would be the following:

** This will lose your historical data. **

Make a backup of your /etc/mrtg/mrtg.cfg

download that file and do a find/replace on the IP address.

replace with your edited file.

Download the particular config from
/usr/local/nagios/etc/services/
do a find/replace on the IP address
change the filename to the new address

Do the same for the particular config from
/usr/local/nagios/etc/hosts

Create a directory like
/usr/local/nagios/etc/newconfig

place both of these files in there.

In the Web interface go to Configure -> Core Config Manager -> Import Config Files

SELECT ONLY the two files you put in /usr/local/nagios/etc/newconfig

Click Import
Apply Configuration.

Once working delete the old one.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked