How to remove orphaned/obsolete service/host definitions?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
txwomansu
Posts: 36
Joined: Mon Oct 10, 2011 9:05 am

How to remove orphaned/obsolete service/host definitions?

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
txwomansu
Posts: 36
Joined: Mon Oct 10, 2011 9:05 am

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

Post 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.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

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

Post 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
txwomansu
Posts: 36
Joined: Mon Oct 10, 2011 9:05 am

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

Post by txwomansu »

Your last advice helped! Thank you.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

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

Post by mguthrie »

You bet!
Locked