Page 1 of 1
Address change on switch
Posted: Thu May 03, 2012 2:50 pm
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
Re: Address change on switch
Posted: Thu May 03, 2012 3:24 pm
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.