host config file left behind when host is disabled / deleted
Posted: Mon Jan 03, 2011 10:27 pm
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?
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?