Host check stuck in pending

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dc7772000
Posts: 27
Joined: Fri Mar 01, 2013 7:08 pm

Host check stuck in pending

Post by dc7772000 »

I've run into an odd issue with Host checks. If I were to add a network device via Monitoring Wizard the host checks runs normally. However if I were to add the device via CCM, the host check stays in pending status. Visually both Host configurations look identical, so I'm not sure what's different.

Grouping structure is as follows.
host/device - 24x7 (host template) - 24x7 (hostgroup) - rsa-cards (host group)
rsa-cards (host group) - RSA-24x7 (service template) - zPing (service)

Steps used
Adding network device via CCM
1) Create host via Host Management
2) Manage Templates - add 24x7
3) Manage Hostgroups - add 24x7 and rsa-cards
4) Under Check Settings - Check Interval 5 min, Retry interval 1 min and Max check attempts 5
5) Save and apply configuration

Results
Host check stuck in pending
Ping check works normally

Adding network device via Monitoring Wizard
1) Under Monitoring Wizard > Generic Network Device > Enter IP and use defaults
2) Go to CCM Host Management > Common settings > Manage Template > remove xiwizard_genericnetdevice_host and add 24x7
3) Go to CCM Host Management > Common settings > Manage Hostgroups > Add 24x7 and rsa-cards
4) Under Check Settings > Clear Check period
5) Under Alert Settings > Clear Notification period
6) Under Alert Settings > Clear Manage Contacts
7) Under Misc Settings > Clear Status image, Icon image and Manage Variable Definitions
8) Save and apply configuration

Results
Host check is working
Ping check is working

OS: CentOS 6.5 (64 bit) - installed as basic server
XI (2012R2.9) manually installed using "fullinstall" script included with tar
Customization - Gearman server & client installed
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Host check stuck in pending

Post by sreinhardt »

Do you see the manually created host in the core interface (http://nagiosserver/nagios) or in the flat files(/usr/local/nagios/hosts/hostname.cfg)? While we are at it, what are the permissions on the etc directory of nagios?

Code: Select all

ll -d /usr/local/nagios/etc/services/
ll -d /usr/local/nagios/etc/hosts/
ll -d /usr/local/nagios/etc/
ll -d /usr/local/nagios
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
dc7772000
Posts: 27
Joined: Fri Mar 01, 2013 7:08 pm

Re: Host check stuck in pending

Post by dc7772000 »

I see them in both web interface and flat files. The results of the permission check is listed below.

[root@sfo-nagiosxi01 nagios]# ll -d /usr/local/nagios/etc/services/
drwsrwsr-x. 2 apache nagios 4096 Jun 12 09:59 /usr/local/nagios/etc/services/
[root@sfo-nagiosxi01 nagios]# ll -d /usr/local/nagios/etc/hosts
drwsrwsr-x. 2 apache nagios 4096 Jun 12 09:59 /usr/local/nagios/etc/hosts
[root@sfo-nagiosxi01 nagios]# ll -d /usr/local/nagios/etc/
drwsrwsr-x. 7 apache nagios 4096 Jun 11 14:03 /usr/local/nagios/etc/
[root@sfo-nagiosxi01 nagios]# ll -d /usr/local/nagios
drwxr-xr-x. 8 root root 4096 May 13 08:48 /usr/local/nagios
[root@sfo-nagiosxi01 nagios]#
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Host check stuck in pending

Post by Box293 »

I think your problem is with the 24x7 host template. I don't think this template has a check command defined like in the xiwizard_genericnetdevice_host template.
Selection_057.png
If I am correct, then I think the reason why it is "working" after running the wizard is as follows:
  • Wizard is run and generic host is added
    You navigate your way to CCM > Host Management blah blah blah
    While you are making the changes, before applying config, your new generic host has been checked by Nagios and has returned an OK state
    So you've made the changes (removed template xiwizard_genericnetdevice_host and add template 24x7) and clicked apply config
    When you go back to check the host status, the host is listed as OK/UP
    I assume this host never goes down because another check is not being run so the state never changes
For one of these hosts added by the wizard (and then templates used has been changed), what is the Last Check Time of the host? Is it way back in the past? See screenshot
Selection_058.png
Also, for these hosts I doubt they have any performance graphs for ping/uptime (_HOST_).
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dc7772000
Posts: 27
Joined: Fri Mar 01, 2013 7:08 pm

Re: Host check stuck in pending

Post by dc7772000 »

It looks like you're 100% correct. The date and time hasn't changed since I've added the device. Also, I've tried scheduling an immediate check on a device that's shown as "up". and it didn't do anything. I've also checked the graphs and host is empty while Ping is graphing normally. I'll go ahead and make some adjustments. Thanks for your help with this.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Host check stuck in pending

Post by Box293 »

Great stuff. I've had a similar issue in the past, sometimes you learn by breaking stuff :lol:
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked