Page 1 of 1

PENDING status of HOST after restart..

Posted: Mon Sep 12, 2011 5:36 am
by vlecaroz
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.

Re: PENDING status of HOST after restart..

Posted: Mon Sep 12, 2011 4:28 pm
by crfriend
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
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.

Re: PENDING status of HOST after restart..

Posted: Tue Sep 13, 2011 1:58 am
by vlecaroz
Hi,

thanks for your reply, yes the retain_state_information=1 in my nagios.cfg.

Re: PENDING status of HOST after restart..

Posted: Tue Sep 13, 2011 1:59 am
by vlecaroz
Is there any other option that I can set to retain the host status after the restart?aside from the retain_state_information..
thanks.

Re: PENDING status of HOST after restart..

Posted: Mon Sep 19, 2011 1:33 am
by garioz
I have the same problem.

Re: PENDING status of HOST after restart..

Posted: Tue Sep 20, 2011 5:28 pm
by crfriend
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..

Posted: Tue Sep 20, 2011 11:59 pm
by vlecaroz
Hi,

I have found the culprit after my last message :lol: 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.....