I want the Nagios server to stop calling itself localhost...
I want the Nagios server to stop calling itself localhost...
I assumed this was a fairly straight forward thing to do but I can't figure it out. After googling I've found a ton of different opinions, none of which worked. Isn't there a simple way to do this?? So far I've only been able to add the server as a host but then it just shows the hostname and localhost as two separate hosts 
Re: I want the Nagios server to stop calling itself localhos
What I should say, is that if I add the proper hostname for the server and IP address in the hosts.cfg file it shows up as a host but localhost still stays as well which makes sense because I assume its reading that from the localhosts.cfg.
But if I try to change localhost to the proper name/IP address in the localhost.cfg file nagios gets broken so obviously I'm doing something wrong there.
But if I try to change localhost to the proper name/IP address in the localhost.cfg file nagios gets broken so obviously I'm doing something wrong there.
Re: I want the Nagios server to stop calling itself localhos
I don't see any reason why one would remove or rename localhost host in nagios, but if you really want to do this, you could comment out the localhost entry in the nagios.cfg, so it would look like this:
Save and exit.
Set up your "new" localhost, with the correct name, IP, etc. Verify your configuration:
and if there are no config errors, restart nagios:
Code: Select all
#cfg_file=/usr/local/nagios/etc/objects/localhost.cfgSet up your "new" localhost, with the correct name, IP, etc. Verify your configuration:
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgCode: Select all
service nagios restartBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: I want the Nagios server to stop calling itself localhos
Thanks that worked 