Unable to delete services

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ddubinsky
Posts: 4
Joined: Wed Mar 05, 2014 5:01 pm

Unable to delete services

Post by ddubinsky »

There are some services that were added incorrectly and i need to delete them. When i try to do that, i get the following error "Could not find a unique id for this service
Service cannot be deleted using this method" I looked at the following link http://support.nagios.com/wiki/index.ph ... lete_Hosts and when i go to edit the config file, it says --- "DO NOT EDIT THIS FILE BY HAND --- Nagios QL will overwite all manual settings during the next update"

I appear to be stuck. Can someone please advise me on how to correct this?

Thanks!

-Dennis
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to delete services

Post by tmcdonald »

Is there a specific reason you are trying to edit the file? The FAQ says to delete it, not edit it.
Former Nagios employee
ddubinsky
Posts: 4
Joined: Wed Mar 05, 2014 5:01 pm

Re: Unable to delete services

Post by ddubinsky »

there are a bunch of other alerts that were added by others that it would take a long time to set up again, but i suppose a full deletion is a possibility. What would be the best way in this case to do that?

Thanks!

-Dennis
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Unable to delete services

Post by slansing »

If they truly are host hosts / services you can remove them manually from the command line, the files you were looking at, because they will not be repopulated as they do not exist in the database anymore.
ddubinsky
Posts: 4
Joined: Wed Mar 05, 2014 5:01 pm

Re: Unable to delete services

Post by ddubinsky »

not sure i follow how i would do that via command line. What would happen if i deleted those config files?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Unable to delete services

Post by slansing »

As I said, and if you are using Nagios XI. Nothing will happen if you remove those config files when they object's exist in the database already, when they do not exist there, but they do exist in the /usr/local/nagios/etc/'hosts/services' directory that means they are ghost hosts, which means they will either show up in the web interface still, or cause dependance issues, things along those lines, and they should be removed.
ddubinsky
Posts: 4
Joined: Wed Mar 05, 2014 5:01 pm

Re: Unable to delete services

Post by ddubinsky »

I deleted the hosts and all of the services in CCM and then deleted the configs from /usr/local/nagios/etc/hosts and /usr/local/nagios/etc/services and they are still showing up in Nagios XI web. Is there something else i need to do or a step im missing? Thanks again for your help thus far.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unable to delete services

Post by tmcdonald »

Did you apply config after deleting from the CCM?
Former Nagios employee
ecarrasq
Posts: 244
Joined: Tue Feb 22, 2011 5:58 pm

Re: Unable to delete services

Post by ecarrasq »

I am having the same issue and I've followed all the outlined steps to remove "ghosts...".
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Unable to delete services

Post by sreinhardt »

This is a 2 month old post, please create your own topic so that we may work on your issue specifically.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked