Editing Host Name and IP HELP ???

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
xmurphylee
Posts: 17
Joined: Tue Jan 19, 2016 10:06 am

Editing Host Name and IP HELP ???

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Editing Host Name and IP HELP ???

Post 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.
Former Nagios Employee
xmurphylee
Posts: 17
Joined: Tue Jan 19, 2016 10:06 am

Re: Editing Host Name and IP HELP ???

Post 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.
xmurphylee
Posts: 17
Joined: Tue Jan 19, 2016 10:06 am

Re: Editing Host Name and IP HELP ???

Post 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.
xmurphylee
Posts: 17
Joined: Tue Jan 19, 2016 10:06 am

Re: Editing Host Name and IP HELP ???

Post 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?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Editing Host Name and IP HELP ???

Post 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
Former Nagios Employee.
me.
xmurphylee
Posts: 17
Joined: Tue Jan 19, 2016 10:06 am

Re: Editing Host Name and IP HELP ???

Post 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Editing Host Name and IP HELP ???

Post by hsmith »

What OS are you running this on?

Try this:

Code: Select all

service apache2 restart
I would like to see the output of what happens when you attempt to restart nagios.
Former Nagios Employee.
me.
xmurphylee
Posts: 17
Joined: Tue Jan 19, 2016 10:06 am

Re: Editing Host Name and IP HELP ???

Post by xmurphylee »

linux
xmurphylee
Posts: 17
Joined: Tue Jan 19, 2016 10:06 am

Re: Editing Host Name and IP HELP ???

Post by xmurphylee »

i made the changes in the .cfg file where the host is located, do i need to compile the new change?
Locked