PENDING status of HOST after restart..

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.
Locked
vlecaroz
Posts: 4
Joined: Mon Sep 12, 2011 5:13 am

PENDING status of HOST after restart..

Post 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.
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Re: PENDING status of HOST after restart..

Post 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.
vlecaroz
Posts: 4
Joined: Mon Sep 12, 2011 5:13 am

Re: PENDING status of HOST after restart..

Post by vlecaroz »

Hi,

thanks for your reply, yes the retain_state_information=1 in my nagios.cfg.
vlecaroz
Posts: 4
Joined: Mon Sep 12, 2011 5:13 am

Re: PENDING status of HOST after restart..

Post 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.
garioz
Posts: 1
Joined: Mon Sep 19, 2011 1:27 am
Contact:

Re: PENDING status of HOST after restart..

Post by garioz »

I have the same problem.
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Re: PENDING status of HOST after restart..

Post 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.
vlecaroz
Posts: 4
Joined: Mon Sep 12, 2011 5:13 am

Re: PENDING status of HOST after restart..

Post 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.....
Locked