Page 1 of 1

Service cannot be deleted using this method

Posted: Tue Aug 23, 2016 5:01 am
by Muthulinux
Hi,

When i was trying to delete the service in nagios XI, I am getting below exception.

---------------------------------------------------------
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

-------------------------------------------------------------------------------------------

Re: Service cannot be deleted using this method

Posted: Tue Aug 23, 2016 9:35 am
by bwallace
In the Ui go to:
Configure > Core Config Manager > Services...find the service in question in the 'Actions' column on the right, click in the blue 'i" icon. This will show you the relationship info, i.e. the other hosts / services it is tied to and this is what those errors are likely alluding to:
The service is associated with other hosts, services, or objects that need to be deleted first
If in any doubt post a screenshot of it here.

Also, Check to see if there are multiple Nagios processes running, as this will cause any number of problems.

run this cmd on your nagios server:
ps - aef | grep nagios.cfg

* Look for multiple parent (PPID) processes. The Nagios process forks itself to run checks therefore subprocesses are normal. The Nagios user should probably be the only owner of the Nagios process. If in any doubt post the output here.

If there are multiple Nagios processes running, run these commands to resolve:

Code: Select all

service nagios stop
killall -9 nagios
service nagios start

Re: Service cannot be deleted using this method

Posted: Sat Oct 22, 2016 2:43 am
by Muthulinux
Hello,

I am able to see below service in the dashboard but when I go to core config manager to delete that service it is not showing there.

TCP Port 5081 Critical 26d 11h 10m 19s 5/5 2016-10-22 10:38:49 connect to address x.x.x.x and port 5081: Connection refused

I did below steps in the server as well but still unable to delete the service. Pls help me out from this trap

service nagios stop

killall -9 nagios

service nagios start

Re: Service cannot be deleted using this method

Posted: Sat Oct 22, 2016 3:02 am
by Muthulinux
Hello,

I am not able to remove the services. below is the method that i used

checked the service dependencies which i want to delete - No services were dependent with that service

Checked the host dependencies in which that service resides - Found that one of the other host service was dependent with this host that is why i was not able to delete the service from this host since it has dependent with other service from other host.

Finally i deleted that dependent service after which i was able to delete this service without any issue.

Thanks dear for your intervention

Re: Service cannot be deleted using this method

Posted: Mon Oct 24, 2016 10:03 am
by avandemore
Glad to hear your issue is resolved. Is it okay to lock this thread?