No hosts show up

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.
chris1337c
Posts: 75
Joined: Wed Dec 26, 2018 2:31 pm

Re: No hosts show up

Post by chris1337c »

Let me rephrase what I did, I only "un-commented" out what I could see wasn't previously commented out (I didn't remove unncessary data comments) in the backup of the nagios.cfg I had prior to the update. So the one I just posted is a 1:1. I am not sure if data corruption caused this regardless, I may need some pointers correcting the errors.

I validated the host of the HV has no issue with the HD's.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No hosts show up

Post by scottwilkerson »

Ya that would be a problem, lets find what file the other missing commands are in

Code: Select all

grep check_openmanage -R /usr/local/nagios/etc/objects|grep command_name
grep check_idrac -R /usr/local/nagios/etc/objects|grep command_name
grep check_terastation_storage -R /usr/local/nagios/etc/objects|grep command_name
grep check_snmp_synology -R /usr/local/nagios/etc/objects|grep command_name
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
chris1337c
Posts: 75
Joined: Wed Dec 26, 2018 2:31 pm

Re: No hosts show up

Post by chris1337c »

Code: Select all

[root@chc-nagios ~]# grep check_openmanage -R /usr/local/nagios/etc/objects|grep command_name
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak3:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak4:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak5:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak6:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands.cfg~:    command_name    check_openmanage
chris1337c
Posts: 75
Joined: Wed Dec 26, 2018 2:31 pm

Re: No hosts show up

Post by chris1337c »

Code: Select all

[root@chc-nagios ~]# grep check_openmanage -R /usr/local/nagios/etc/objects|grep command_name
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak3:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak4:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak5:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak6:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands.cfg~:    command_name    check_openmanage
[root@chc-nagios ~]# ^C
[root@chc-nagios ~]# grep check_openmanage -R /usr/local/nagios/etc/objects|grep command_name
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak3:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak4:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak5:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak6:        command_name    check_openmanage
/usr/local/nagios/etc/objects/commands.cfg~:    command_name    check_openmanage
[root@chc-nagios ~]# grep check_idrac -R /usr/local/nagios/etc/objects|grep command_name
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak3:        command_name    check_idrac
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak4:        command_name    check_idrac
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak5:        command_name    check_idrac
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak6:        command_name    check_idrac
/usr/local/nagios/etc/objects/commands.cfg~:    command_name    check_idrac
[root@chc-nagios ~]# grep check_terastation_storage -R /usr/local/nagios/etc/objects|grep command_name
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak4:        command_name    check_terastation_storage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak5:        command_name    check_terastation_storage
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak6:        command_name    check_terastation_storage
/usr/local/nagios/etc/objects/commands.cfg~:    command_name    check_terastation_storage
[root@chc-nagios ~]# grep check_snmp_synology -R /usr/local/nagios/etc/objects|grep command_name
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak5:        command_name    check_snmp_synology
/usr/local/nagios/etc/objects/commands_backup/commands.cfg.bak6:        command_name    check_snmp_synology
/usr/local/nagios/etc/objects/commands.cfg~:    command_name    check_snmp_synology
chris1337c
Posts: 75
Joined: Wed Dec 26, 2018 2:31 pm

Re: No hosts show up

Post by chris1337c »

Its super weird scott, basically every file with the correct settings has a ~ after it, and all of the files that are missing them don't. It's like it reverted but.... I just removed the ~ from the commands.cfg, and renamed the other one to commands.cfg.idk. and now here is the dump from the config:

Code: Select all

Checking objects...
Warning: Service 'Global Health Status' on host 'OM_CHC3MAIN'  has a notification interval less than its check interval!  Notifications are only re-sent after checks are made, so the effect                                                ive notification interval will be that of the check interval.
        Checked 246 services.
        Checked 56 hosts.
        Checked 2 host groups.
        Checked 0 service groups.
        Checked 1 contacts.
        Checked 1 contact groups.
        Checked 30 commands.
        Checked 6 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 56 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 6 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 1
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No hosts show up

Post by scottwilkerson »

That is strange, but it looks like you there now with just a warning for a notification interval less than its check interval on that one service.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
chris1337c
Posts: 75
Joined: Wed Dec 26, 2018 2:31 pm

Re: No hosts show up

Post by chris1337c »

There is a random winserver listed as a host and the text notifications stopped. I am digging into this now. I don't understand how this happened but I am happy 99% of it is functioning versus 0% currently.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No hosts show up

Post by scottwilkerson »

I would look at the host detail page for this host and see if notifications show as

Code: Select all

Notifications:	  ENABLED
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
chris1337c
Posts: 75
Joined: Wed Dec 26, 2018 2:31 pm

Re: No hosts show up

Post by chris1337c »

Code: Select all

Nagios Core 4.4.3
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2019-01-15
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
        Checked 239 services.
        Checked 55 hosts.
        Checked 2 host groups.
        Checked 0 service groups.
        Checked 2 contacts.
        Checked 1 contact groups.
        Checked 30 commands.
        Checked 6 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 55 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 6 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
[root@chc-nagios ~]#
It ended up we had a contacts.cfg and contacts.cfg~ <<The ~ contacts had the original information> I renamed them, checked the notifications like you said and all is well! Thanks for the tips, the GREP commands helped me identify which files were wreaking havoc.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: No hosts show up

Post by scottwilkerson »

chris1337c wrote: It ended up we had a contacts.cfg and contacts.cfg~ <<The ~ contacts had the original information> I renamed them, checked the notifications like you said and all is well! Thanks for the tips, the GREP commands helped me identify which files were wreaking havoc.
Great! Glad to hear it is all resolved!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked