Page 1 of 1

All hosts are in "host check is pending"

Posted: Fri Jan 16, 2015 12:28 pm
by danoreilly
Converted from Nagios Core to Nagios XI. All my hosts were imported, but they all show "pending" status, and host detail shows "host check is pending". How do I get these out of this state?

Re: All hosts are in "host check is pending"

Posted: Fri Jan 16, 2015 12:40 pm
by tmcdonald
That should go away after a few minutes. That just means the first check for that host or service has not run. Clicking on the service will bring you to a page with a "Force immediate check" button that will make it run regardless of its schedule. You can also try running "service nagios restart".

Re: All hosts are in "host check is pending"

Posted: Fri Jan 16, 2015 1:03 pm
by danoreilly
These have all been in that state for 12 hours or more now, including a couple hosts where I enabled services (and the services are running correctly). The only host that doesn't show that state is localhost.

Re: All hosts are in "host check is pending"

Posted: Fri Jan 16, 2015 2:07 pm
by lmiltchev
Have you tried restarting the nagios and crond service?

Code: Select all

service nagios restart
service crond restart
Run the following commands and show us the output:

Code: Select all

ls -la /usr/local/nagios/var/retention.dat
grep "retention_" /usr/local/nagios/etc/nagios.cfg
grep "execute_" /usr/local/nagios/etc/nagios.cfg

Re: All hosts are in "host check is pending"

Posted: Fri Jan 16, 2015 2:28 pm
by danoreilly
I had rebooted the system even. As for the commands:

[root@nagiosxi etc]# grep "retention_" /usr/local/nagios/etc/nagios.cfg
retention_update_interval=60
state_retention_file=/usr/local/nagios/var/retention.dat
[root@nagiosxi etc]# grep "execute_" /usr/local/nagios/etc/nagios.cfg
execute_host_checks=1
execute_service_checks=1
[root@nagiosxi etc]#

Re: All hosts are in "host check is pending"

Posted: Fri Jan 16, 2015 2:41 pm
by slansing
When you clicked the force immediate check button, what happened? Did the check times update? Did you get out of a pending state? Are all of your service checks being scheduled and ran properly with current timestamps? What is the output of:

Code: Select all

date

hwclock
And what is the timezone you are currently in?

Re: All hosts are in "host check is pending"

Posted: Fri Jan 16, 2015 3:57 pm
by danoreilly
I've forced a check, nothing changes
I've rebooted, nothing changes
the time is correct
the clock is correct
nothing changes.

Re: All hosts are in "host check is pending"

Posted: Fri Jan 16, 2015 6:14 pm
by Box293
This is likely to be a check_command missing in a template or something like that.

In Nagios XI Open Core Configuration Manager (CCM)
Click Monitoring > Hosts
Click one of the hosts
Question: Is there a check command selected.
If your answer is yes, post a screenshot here.
If your answer is no, continue with these steps.
Click the Manage Templates button
Is there a Template Assigned?

If your answer is no, then you do not have a check command assigned hence it's always pending.

If your answer is yes, make a note of the template name
Click Close
On the left pane click Templates > Host Templates
Click the template that was assigned before
Question: Is there a check command selected.
If your answer is yes, post a screenshot here.
If your answer is no, then you do not have a check command assigned hence it's always pending. Have a look at one of the other host templates and duplicate the Check command selected and the settings in the$ARG$ fields.
Save Config and Apply

If this doesn't fix the problem, provide us with the information above as well as, for that host, type this command at the Nagios XI command prompt and paste the contents here (replace vCenter with the exact name of your host):

Code: Select all

cat /usr/local/nagios/var/objects.cache | sed -rn "/define host \{/{:a;N;/}/{/.host_name.vCenter/p;d};ba}"

Re: All hosts are in "host check is pending"

Posted: Mon Jan 19, 2015 3:37 pm
by abrist
Let us know if this resolved you issue OP.