Page 1 of 1

How to remove orphaned/obsolete service/host definitions?

Posted: Mon Nov 07, 2011 3:41 pm
by txwomansu
Hello,

Some services are showing under Nagios XI and not in Nagios Core (Nagios QL). I am trying to remove the services that are not showing in Nagios QL/Nagios Core.

How do you detele orphaned/obsolete service/host definitions in NagiosXI? I tried to remove a service in Nagios XI and I get:
'
Could not find a unique id for this service
Service cannot be deleted using this method
One or more errors were detected that prevent the service from being deleted.

Possible causes include...

•The service is associated with other hosts, services, or objects that need to be deleted first
•The service is generated by an advanced monitoring configuration entry
•The service is maintained in a static or external configuration file
To resolve this issue...

•Use the Nagios Core Configuration Manager to delete the service - or -
•Manually delete the service definition from the appropriate external configuration file

'
The first solution provided does not work; the obsolete service is not even showing in Nagios Core... I am not sure how to find external configuration file; nagios.cfg does not provide a path to such a file.

Please help.

PS> Nagios XI is a manual install instance, the latest version on RHEL5.7, 32-bit.

Thanks,
Svetlana

Re: How to remove orphaned/obsolete service/host definitions

Posted: Mon Nov 07, 2011 4:28 pm
by lmiltchev
Are you able to Apply Configuration in the Nagios Core Config Manager successfully or you get some errors?

Did you assign this service to a hostgroup?
If you did, then any hosts added to this hostgroup would get this service assigned to them. Go to the Core Config Manager->Services, locate your service and remove the hostsgroup assignments.

Did you try:

Code: Select all

# killall nagios
# service nagios start
Did you check:

Code: Select all

# ls /usr/local/nagios/etc/static

Re: How to remove orphaned/obsolete service/host definitions

Posted: Mon Nov 07, 2011 4:39 pm
by lmiltchev
Also, it is possible that you assigned this particular service to more than one host by mistake. Go to the Core Config Manager->Services, click on the "Modify" Action button next to this service and see if it is assigned to more than one host. If it is, remove the host associations, so you can delete the service successfully and apply the configuration.

Re: How to remove orphaned/obsolete service/host definitions

Posted: Fri Nov 18, 2011 2:08 pm
by txwomansu
Hello,

Sorry for the late reply. I have tried what you suggested but the issue is still present. As I said, the obsolete service is not even showing in Nagios Core... Moreover, even the host that this service is attached to is not showing in Nagios Core.

Please advise.
Thanks.

Re: How to remove orphaned/obsolete service/host definitions

Posted: Fri Nov 18, 2011 2:17 pm
by mguthrie
Take a look at the below wiki, I'm guessing the second entry will fix your issue:
http://support.nagios.com/wiki/index.ph ... lete_Hosts

Re: How to remove orphaned/obsolete service/host definitions

Posted: Fri Nov 18, 2011 3:18 pm
by txwomansu
Your last advice helped! Thank you.

Re: How to remove orphaned/obsolete service/host definitions

Posted: Fri Nov 18, 2011 3:46 pm
by mguthrie
You bet!