Page 1 of 2
Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 10:15 am
by xmurphylee
I am looking for a procedure to edit a host (switch) name and IP. I have looked in Host Groups under "Add a new comment" which gives an option to edit the host name, althouugh I dont have permissions as of this instance, but is this where you would edit the host name. Secondly, I am searching how to update the IP so Nagios can log the new switch changes. I have went into the switch and configured for NAgios to recieve logging although it was already configured prior to new switch changes. I am using Nagios Core Version 4.0.4
Thanks.
Re: Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 10:34 am
by rkennedy
To change these settings you'll need to locate the configuration file for that host definition. Do you know what file it's stored in?
The tree folder should start at /usr/local/nagios/etc/ for configuration files.
Re: Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 11:13 am
by xmurphylee
No I do not, this will be my first attempt at getting into the linux server Nagios is running on to make the changes needed.
Re: Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 11:17 am
by xmurphylee
No I do not know exactly where the file is stored on the Linux server, but I will be making an attempt to go in and make a change. I will start with the tree folder you suggested.
Re: Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 11:44 am
by xmurphylee
Ok so, I did find the files and I did change the IP and Host name and saved. I than did a program restart and now I am receiving: Whoops! Error: Could not read host and service status information!
Any ideas?
Re: Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 12:06 pm
by hsmith
What did you restart?
You should restart the nagios service and the http service.
Code: Select all
service httpd restart
service nagios restart
Re: Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 12:23 pm
by xmurphylee
i restarted nagios services under system>processinfo> in the gui. I than tried your commands and i got a no such service for the httpd command and a Job for nagios.service failed.
Re: Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 12:30 pm
by hsmith
What OS are you running this on?
Try this:
I would like to see the output of what happens when you attempt to restart nagios.
Re: Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 12:36 pm
by xmurphylee
linux
Re: Editing Host Name and IP HELP ???
Posted: Tue Jan 19, 2016 12:39 pm
by xmurphylee
i made the changes in the .cfg file where the host is located, do i need to compile the new change?