All hosts are in "host check is pending"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
danoreilly
Posts: 28
Joined: Mon Dec 01, 2014 4:28 pm

All hosts are in "host check is pending"

Post 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?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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".
Former Nagios employee
danoreilly
Posts: 28
Joined: Mon Dec 01, 2014 4:28 pm

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

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
danoreilly
Posts: 28
Joined: Mon Dec 01, 2014 4:28 pm

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

Post 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]#
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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?
danoreilly
Posts: 28
Joined: Mon Dec 01, 2014 4:28 pm

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

Post by danoreilly »

I've forced a check, nothing changes
I've rebooted, nothing changes
the time is correct
the clock is correct
nothing changes.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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}"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post by abrist »

Let us know if this resolved you issue OP.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked