Nagios Host.cfg/Services.cfg Issues


#1

I recently added a new host and new service to my Nagios .cfg files. After adding them I stopped and restarted the Nagios service on my Linux box. Once the site was back up the new host and service was not available. I ran a /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg to check my configuration. The test completed successfully, no issue or erros were found. I scrolled up to see how many hosts and services were check and the correct number is there. It sees 10 hosts and 60 services. When I go to the website it only has 9 hosts and 59 services. Any ideas why the website is not updating. :roll:


#2

can you post your configuration? for the new host? most probably you got an error there. please also post log files.


#3

possibly you have two instances of nagios running…
stop nagios, check for running nagios processes, kill them, restart nagios.

Luca


#4

If there was a bad setting in the config file, I bet the -v would have caught it. I’m gonna vote for luca’s solution. I don’t thing the website you are looking at is the instance that was restarted. Kill them all, make sure they are all dead, then restart.
ps -ef|grep nagios
NUTTIN for output is what you need to see.
except maybe “grep nagios”


#5

Here is the config for the Host I just added:

define host{
host_name systemmonitor
alias Boston Nagios Server
address X.X.X.X
max_check_attempts 3
check_period timeperiod_name
contact_groups System_Admins
notification_interval 5
notification_period timeperiod_name
notification_options d,u,r,f
notifications_enabled 1
}

THis is exactly what I have for the other hosts in the .cfg file. The service cfg file entry is the same is what I have for others so I do not think it is a typo or incorrect setting. I killed all Nagios process, but still have the same issue. Any other ideas. :frowning:


#6

/etc/rc.d/init.d/nagios stop
ps -ef|grep nagios
/etc/rc.d/init.d/nagios start
Please show us that indeed nagios is dead. It seriously looks like your config is good, but nagios has never been restarted.
Reboot your puter if you have to.