Page 1 of 3

Ghost hosts won't go away

Posted: Mon Jun 25, 2012 2:53 pm
by ockmeyer
I deleted three hosts and all their associated services, but they still show up in the NagiosXI minemap.

I've tried killall nagios, service nagios start

I've deleted the config files from /usr/local/nagios/etc/hosts and /services

The write config files tool in CCM return no errors and the check config files comes back fine. Restarting nagios doesn't help.

I've scrubbed the forum but haven't found anything new to try.

NagiosXI 2011R3.1, Nagios Core 3.4.1, NagiosQL 3.0.3.

Suggestions?

Re: Ghost hosts won't go away

Posted: Mon Jun 25, 2012 3:06 pm
by scottwilkerson
This problem may be related to the following wiki
http://support.nagios.com/wiki/index.ph ... 3.x_Issues

Also, lets force a restart of ndo2db

Code: Select all

service ndo2db stop
killall -9 ndo2db 
service ndo2db start

Re: Ghost hosts won't go away

Posted: Mon Jun 25, 2012 3:27 pm
by ockmeyer
My settings in sysctl.conf match the article. When I try to stop ndo2db I get the message:

Stopping ndo2db: head: cannot open `/usr/local/nagios/var/ndo2db.lock' for reading: No such file or directory
done.

But the file is there

Re: Ghost hosts won't go away

Posted: Mon Jun 25, 2012 4:00 pm
by agriffin
This sounds like a permissions issue. What output do you get running the following command?

Code: Select all

ls -ld /usr{,/local{,/nagios{,/var{,/ndo2db.lock}}}}

Re: Ghost hosts won't go away

Posted: Mon Jun 25, 2012 4:04 pm
by ockmeyer
-rw-r--r-- 1 nagios nagios 5 Jun 25 15:04 /usr/local/nagios/var/ndo2db.lock

Re: Ghost hosts won't go away

Posted: Mon Jun 25, 2012 4:08 pm
by agriffin
That doesn't seem to be from the same command I posted; those braces and commas were important too. I need to see the directory permissions on everything above it to know whether ndo2db can use the file. Would you mind running it again?

Re: Ghost hosts won't go away

Posted: Mon Jun 25, 2012 4:09 pm
by ockmeyer
Sorry...Linux newbie

drwxr-xr-x. 13 root root 4096 Oct 31 2011 /usr
drwxr-xr-x. 17 root root 4096 Jun 25 10:50 /usr/local
drwxr-xr-x 8 root root 4096 Aug 29 2011 /usr/local/nagios
drwxrwxr-x 6 nagios nagios 4096 Jun 25 15:09 /usr/local/nagios/var
-rw-r--r-- 1 nagios nagios 5 Jun 25 15:04 /usr/local/nagios/var/ndo2db.lock

Does /usr/local/nagios need different permissions?

Re: Ghost hosts won't go away

Posted: Mon Jun 25, 2012 4:19 pm
by scottwilkerson
ockmeyer wrote:My settings in sysctl.conf match the article.

The article says once you confirm they are correct you need to run the following to apply the new settings. If the system still appears to be working improperly, reboot the machine.

Code: Select all

sysctl -p

Re: Ghost hosts won't go away

Posted: Mon Jun 25, 2012 4:20 pm
by agriffin
Your permissions look fine, give scott's advice a try though.

Re: Ghost hosts won't go away

Posted: Mon Jun 25, 2012 4:23 pm
by ockmeyer
I ran sysctl -p and rebooted after checking the settings. No luck.