Page 1 of 2
Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 10:17 am
by MKEbrew
I am unfortunately still on Nagios 3.2.3 which I know had some issues.
That said, I added a new host template and 34 hosts today, configuration checks out, cfg file is "seen" by Nagios, but the hosts do not show up on the GUI or in the objects.cache file. I had recently added and removed hosts with no issue.
Stopped the service and deleted retention.dat, status.dat, objects.cache. Started the service and hosts are still missing.
I need to continue to use this version of Nagios for some time yet, but I need to get these hosts in there. What else could/should I be looking at?
Thank you.
Re: Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 10:31 am
by abrist
First, make sure that your config shows up when you verify. Next, lets make sure you do not have multiple nagios parent processes:
Code: Select all
service nagios stop
ps -aef | grep nagios.cfg
killall nagios
ps -aef | grep nagios.cfg
service nagios start
Re: Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 10:37 am
by MKEbrew
Hi abrist, thank you for replying.
After stopping nagios, I do not have any nagios processes running - nothing to kill.
when I do a config check, it does see the cfg file (IP phones):
Code: Select all
Processing object config file '/usr/local/nagios/etc/hosts/phones.cfg'...
I get 8 warnings for hosts unrelated hosts with no services and 0 errors.
Re: Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 11:25 am
by abrist
Are the hosts configured with a a host check?
Re: Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 12:23 pm
by MKEbrew
Here is the template and one host directive:
Code: Select all
define host{
name ip-phones
event_handler_enabled 1
flap_detection_enabled 1
retain_status_information 1
retain_nonstatus_information 1
check_period 24x7
check_interval 5
retry_interval 1
check_command check-host-alive
register 0
}
define host{
use ip-phones
name 4800
alias 4800
address x.x.x.x
hostgroups Phones
}
IP hidden, of course.
Re: Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 12:41 pm
by abrist
Can you post the full output of a verify in code wraps?
Re: Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 12:52 pm
by MKEbrew
Code: Select all
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/ServiceGroups.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/ts.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/exchange.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/vnc_servers.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/phones.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/comms.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/google.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/hosts.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/Lsec1.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/vmware.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/cloud_server.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/dc.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/security.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/sql_servers.cfg'...
Processing object config directory '/usr/local/nagios/etc/gear'...
Processing object config file '/usr/local/nagios/etc/gear/switches.cfg'...
Processing object config file '/usr/local/nagios/etc/gear/asa.cfg'...
Processing object config file '/usr/local/nagios/etc/gear/wap.cfg'...
Processing object config file '/usr/local/nagios/etc/gear/routers.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Checked 57 services.
Checking hosts...
Warning: Host 'COMSRV' has no services associated with it!
Warning: Host 'Camera1' has no services associated with it!
Warning: Host 'Camera2' has no services associated with it!
Warning: Host 'Cloud' has no services associated with it!
Warning: Host 'ISP' has no services associated with it!
Warning: Host 'rtr1' has no services associated with it!
Warning: Host 'SQL' has no services associated with it!
Warning: Host 'UTILITIES' has no services associated with it!
Checked 40 hosts.
Checking host groups...
Checked 10 host groups.
Checking service groups...
Checked 15 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 36 commands.
Checking time periods...
Checked 6 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 8
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Re: Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 1:07 pm
by abrist
Can you run a grep of the object and status files?
Code: Select all
grep "4800" /usr/local/nagios/var/objects.cache
grep "4800" /usr/local/nagios/var/status.dat
Re: Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 1:16 pm
by MKEbrew
That's what I was saying before, these hosts are not showing in either of those files.
I did grep them just to be sure - nothing.
Wasn't sure if I should stop nagios and clear spool files or what other things I should look at. The only issue I've had before was the retention data would get weird, so I'd stop nagios, delete the dat file, and start it and all would be good.
Never had hosts just not show before.
I really appreciate your help on this!
Re: Hosts missing from objects.cache
Posted: Mon Apr 07, 2014 3:32 pm
by lmiltchev
Can you zip up the whole "nagios" directory and PM it to any of us (Nagios Support Team)?