phantom host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
KiwiBloke
Posts: 81
Joined: Fri Apr 27, 2012 7:23 pm

phantom host

Post by KiwiBloke »

Hi,

I have a Nagios XI 2012R1.6 server that is running happily. Except I noticed today while trouble shooting another issue that a few hosts do not have all the correct services being monitored even though those services are being applied to the hostgroups that these servers belong too.

After attempting and failing to update these services I decided to delete one of the hosts and recreate it....

So, I managed to delete it ok. but it still exists outside the configuration screens! (even its data files)

so I checked
hostgroups.cfg - it doesn't appear here
/hosts/ - it doesn' exist here either

Can you advise what i am not looking at, or what further information can I send you to help diagnose?

Cheers,

KB
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: phantom host

Post by sreinhardt »

Just to verify, are you able to successfully verify and write configurations? It would seem that the database still believes that your host\services should be shown however the current nagios config does not seem to have the files. This generally is caused when the configuration is not able to be applied correctly, but that's not to say it is the only reason.
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.
KiwiBloke
Posts: 81
Joined: Fri Apr 27, 2012 7:23 pm

Re: phantom host

Post by KiwiBloke »

Hi,

No, the configuration applies correctly, that's why it has taken me a while to notice.

I noticed that the host didn't have certain services applied to it, yet they were applied in the config, so i tried various things, ultimately trying to remove it, this is when noticed it wasn't in the configs but must be in the database.

so its in there as a phantom and i can't updated or delete it.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: phantom host

Post by abrist »

Go to --> Configure --> Core Config Manager --> Tools --> Write Config Files. Click "Write" and then "Verify". DO NOT click restart or apply configuration just yet. Now go look in:

Code: Select all

/usr/local/nagios/etc/hosts
and

Code: Select all

/usr/local/nagios/etc/services
For your ghost host config. Remove those configs if they exist. Now try to restart nagios.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
KiwiBloke
Posts: 81
Joined: Fri Apr 27, 2012 7:23 pm

Re: phantom host

Post by KiwiBloke »

Hi,

Thanks for that. I did as you suggested. The server that is the problem didn't appear to be one of the configurations written out so there was nothing to delete.

After the restart the server still appears in the running configuration, as well as having several phantom services linked to it.

Looking forward to your next suggestion :)

C.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: phantom host

Post by scottwilkerson »

My guess would be that you have a hostgroup assigned to services then, which will add the services to every member of the hostgroup.

If you could please send a configuration snapshot either via PM or to [email protected] with a link to this thread and also include the hostname/service name in question and we will have a look
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
KiwiBloke
Posts: 81
Joined: Fri Apr 27, 2012 7:23 pm

Re: phantom host

Post by KiwiBloke »

Hi,

Thanks for that. I have emailed the snapshot to the address you provided.

Cheers,

KB.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: phantom host

Post by slansing »

Closing as a ticket has been opened for this.
Locked