Host and services still showing but don't exist in CCM - Lou

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
Louis
Posts: 11
Joined: Wed Jan 15, 2014 7:23 pm
Location: Perth, Australia
Contact:

Host and services still showing but don't exist in CCM - Lou

Post by Louis »

Hi there,

Running Nagios XI 2012R2.9.

[root@nagios ~]# cat /proc/version
Linux version 2.6.32-431.5.1.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Wed Feb 12 00:41:43 UTC 2014

It's been a while since I set it up but I'm pretty sure I used one of the VMWare images offered at the time.
Nothing too special about the setup; we use SSL for the web portal but not for any monitoring.

The issue I have is this:

Image

The host (and its services still show) but:

Image

I deleted them AAAAGGGGEEESSS ago and they won't disappear.

Since deleting them, I've added and deleted many other hosts and services and they all come and go just fine... it's JUST this one host that won't bugger off.

Any assistance appreciated.
Cheers.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host and services still showing but don't exist in CCM

Post by lmiltchev »

You deleted it from the CCM (database), it is NOT defined in the "static" directory, but it still shows up in the web UI, correct? I believe you either have a multiple instances of nagios running or a "ghost" hosts/services. For more info on "ghosts", check the following wiki faq page:

https://support.nagios.com/wiki/index.p ... t_Hosts.29
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Louis
Posts: 11
Joined: Wed Jan 15, 2014 7:23 pm
Location: Perth, Australia
Contact:

Re: Host and services still showing but don't exist in CCM

Post by Louis »

lmiltchev wrote:You deleted it from the CCM (database), it is NOT defined in the "static" directory, but it still shows up in the web UI, correct?
I believe that's correct -- where is the "static" directory so I can check that?

I tried the steps outlined in that FAQ for "Host Still Visible After Deletion: (Ghost Hosts)" and "Host Still Visible In XI After Deletion From the CCM".
The first one made no difference and the second one results in Nagios being unable to start or compile config:
[root@nagios hosts]# service nagios start
Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration.
Error: Could not expand master hostgroups and/or hosts specified in host dependency (config file '/usr/local/nagios/etc/hostdependencies.cfg', starting on line 30)
Error processing object config files!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Host and services still showing but don't exist in CCM

Post by Box293 »

Static is /usr/local/nagios/etc/static/ however it sounds like you are not using it.

Try this:
Go into CCM
Tools > Write Config Files
Click the Write Button
It will show an output of all the files it creates
Click the Verify button
The output should end with "Total Errors: 0"

Do you get 0 errors?

If you don't please go and resolve the highlighted problem and then perform the steps above again (such as disable the service it complains about or fix the problem it describes).

If you don't have any errors what happens when you Apply Config?
Quick Tools > Apply Configuration
Click the Apply Configuration button
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
Louis
Posts: 11
Joined: Wed Jan 15, 2014 7:23 pm
Location: Perth, Australia
Contact:

Re: Host and services still showing but don't exist in CCM

Post by Louis »

Total Warnings: 5
Total Errors: 0

The 5 warnings are all completely unrelated to the hosts and services still showing, but I'll fix them up anyway.

When I apply config:
Command submitted for processing...
Waiting for configuration verification.............
Configuration applied successfully.
Success! Nagios Core was restarted with an updated configuration.
But the deleted hosts and services continue to show in the frontend.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Host and services still showing but don't exist in CCM

Post by ssax »

Run this command and see if it returns anything:

Code: Select all

echo "select * from tbl_service where service_description like '%PIPE Peering Link - Brisbane Status%' \G;" | mysql -pnagiosxi nagiosql
User avatar
Louis
Posts: 11
Joined: Wed Jan 15, 2014 7:23 pm
Location: Perth, Australia
Contact:

Re: Host and services still showing but don't exist in CCM

Post by Louis »

ssax wrote:Run this command and see if it returns anything:

Code: Select all

echo "select * from tbl_service where service_description like '%PIPE Peering Link - Brisbane Status%' \G;" | mysql -pnagiosxi nagiosql
[root@nagios ~]# echo "select * from tbl_service where service_description like '%PIPE Peering Link - Brisbane Status%' \G;" | mysql -pnagiosxi nagiosql
[root@nagios ~]#
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Host and services still showing but don't exist in CCM -

Post by tgriep »

Maybe they are in the retention.dat file. Can you upload this file so we can review it?

Code: Select all

/usr/local/nagios/var/retention.dat
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
Louis
Posts: 11
Joined: Wed Jan 15, 2014 7:23 pm
Location: Perth, Australia
Contact:

Re: Host and services still showing but don't exist in CCM -

Post by Louis »

tgriep wrote:Maybe they are in the retention.dat file. Can you upload this file so we can review it?

Code: Select all

/usr/local/nagios/var/retention.dat
They are - this was already covered though in my previous thread that got split :|

I stopped Nagios, removed them, started Nagios, they were gone, clicked Apply Config in CCM and they came back.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Host and services still showing but don't exist in CCM -

Post by lmiltchev »

I stopped Nagios, removed them, started Nagios, they were gone, clicked Apply Config in CCM and they came back.
H-m-m, they must be in the database then. Is opening an email support ticket an option for you? If it is, please email the "profile.zip" to [email protected].

Admin->System Profile->Download Profile.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked