host config file left behind when host is disabled / deleted

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

host config file left behind when host is disabled / deleted

Post by Box293 »

I have found a problem where a host configuration file is left behind / not cleaned up after a series of steps outlined below.

I create a test host using the generic network device wizard, no services are defined

Using Core Configuration Manager
I create a host group called test and I add the test host to the group
I apply configuration

I then copy the localhost ping service
I edit the copied ping service
I change the Config Name to test_ping
I remove localhost from the host_name directive and add the test group to the hostgroup_name directive
I mark the service active
I apply configuration

I go and check the test host, all is good, the ping service has appeared for the test host

Using Core Configuration Manager
I disable the test host
I apply configuration
I get the Configuration Verfication Error applying configuration
I understand this because the host group is empty yet it is still used by a service

I disable the test_ping service
I appy configuration and it is sucessful

Now I go to the home screen
I go to the Host Detail section
the test host still exists (this is the problem I am reporting)
the service does not exist, it was removed correctly

I can also see on the Nagios XI server that the host object still exists under /usr/local/nagios/etc/hosts

I need to re-enable the host
apply configuration
then disable the host again
apply configuration
Now the host object no longer exists

I have found this problem difficult to troubleshoot when I delete an object instead of disabling it. It seems that I need to re-create the host object, apply configuration so I can then disable it so it's object is correctly deleted from /usr/local/nagios/etc/hosts

Before I disable / delete an object I do use the Information button in Core Configuration Manager and it tells me that deletion is possible. This does not seem to be the case after the problems that occur if the host is the last member of a host group.

This occurs on Nagios XI 2009R1.3G, VMware image running on ESXi.

Does this make sense?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: host config file left behind when host is disabled / deleted

Post by mguthrie »

We appreciate you outlining these steps, we'll run some tests to verify this.

We have seen occasions in the past where hosts are from the CCM, and can't be found in the database, but it's config file still exists. We never did pin down what was causing it. I don't think that NagiosQL (the CCM) does any kind of directory scan to see what else is in the directories. As most programs do, it runs under the assumption that everything is working the way it's supposed to. ;)

I'll take a look at this and let you know what I find out.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: host config file left behind when host is disabled / deleted

Post by Box293 »

No problems, it was a strange one to reproduce.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: host config file left behind when host is disabled / deleted

Post by rdedon »

Thanks for the heads up again :-)
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
Locked