Hi All,
I have setup Nagios 3.3.1 and its working fine but the only thing it bothers me was when I restart/reload Nagios(I add a host or a service), all the existing hosts (before I restart nagios) have PENDING status when I check the nagios webpage. Is this normal or not?is there something I need to configure on nagios.cfg or cgi.cfg to retain the last status of all of my hosts before the reload/restart?
In nagios.cfg i have this:
object_cache_file=/var/log/nagios/objects.cache
status_file=/var/log/nagios/status.dat
state_retention_file=/var/log/nagios/retention.dat
This last status of all hosts should on the above files, but it seems its not getting anything that is why its always having a PENDING status if i restart nagios(this is only my assumption)?
Hope someone can help me.Thanks.
PENDING status of HOST after restart..
Re: PENDING status of HOST after restart..
Do you also have "retain_state_information=1" set? There are several options like that which allow one to control precisely what Nagios retains across shutdowns/restarts and what it does not.vlecaroz wrote:I have setup Nagios 3.3.1 and its working fine but the only thing it bothers me was when I restart/reload Nagios(I add a host or a service), all the existing hosts (before I restart nagios) have PENDING status when I check the nagios webpage. Is this normal or not?is there something I need to configure on nagios.cfg or cgi.cfg to retain the last status of all of my hosts before the reload/restart?
In nagios.cfg i have this:
object_cache_file=/var/log/nagios/objects.cache
status_file=/var/log/nagios/status.dat
state_retention_file=/var/log/nagios/retention.dat
Re: PENDING status of HOST after restart..
Hi,
thanks for your reply, yes the retain_state_information=1 in my nagios.cfg.
thanks for your reply, yes the retain_state_information=1 in my nagios.cfg.
Re: PENDING status of HOST after restart..
Is there any other option that I can set to retain the host status after the restart?aside from the retain_state_information..
thanks.
thanks.
Re: PENDING status of HOST after restart..
Do the hosts in question eventually transition out of "Pending" status whilst Nagios is running? If they do not, you may need to turn "aggressive host checking" on so those data will get written to the state-retention file.
Re: PENDING status of HOST after restart..
Hi,
I have found the culprit after my last message I overlooked the host template, the retain_state_information set to 0 that is why even my retain_state_information is set to 1 in nagios.cfg the host still is in pending status. After setting the retain_state_info to 1 in my host template, no pending status for all the monitored hosts.
@garioz, you have to check the host template that your hosts are using, maybe same issue with mine.
Thanks guys for your time.
Cheers.....
I have found the culprit after my last message I overlooked the host template, the retain_state_information set to 0 that is why even my retain_state_information is set to 1 in nagios.cfg the host still is in pending status. After setting the retain_state_info to 1 in my host template, no pending status for all the monitored hosts.
@garioz, you have to check the host template that your hosts are using, maybe same issue with mine.
Thanks guys for your time.
Cheers.....