Not able to delete Host and Services from CCM

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
24x7servermanagement
Posts: 13
Joined: Fri Oct 14, 2016 1:27 am

Not able to delete Host and Services from CCM

Post by 24x7servermanagement »

Having this weird issue and unable to delete two hosts and services associated with it. The service status view reports the services are down and when we are trying to delete it from the CCM its not listing the host and its services.

Not sure what to do here now. Please assist.
24x7servermanagement
Posts: 13
Joined: Fri Oct 14, 2016 1:27 am

Re: Not able to delete Host and Services from CCM

Post by 24x7servermanagement »

Any update on this ? Today deleted another host and it was successfully removed. And for some time i could see the previous two hosts were also gone, but after some time its back again.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Not able to delete Host and Services from CCM

Post by lmiltchev »

Is this a standard ("vanilla") setup or it is a heavily customized system? Do you have a failover server or mysql redundancy server? Are you using programs such as puppet or chef? Do you have any scripts that may be running on a cron job, adding hosts/services, either via the REST API or by the method described in the document below?

https://assets.nagios.com/downloads/nag ... gement.pdf

Having said that, it is hard to say what is causing these hosts to "reappear" without looking at your configs and various logs. Is opening a new support ticket in our email ticketing system an option for you?
Be sure to check out our Knowledgebase for helpful articles and solutions!
24x7servermanagement
Posts: 13
Joined: Fri Oct 14, 2016 1:27 am

Re: Not able to delete Host and Services from CCM

Post by 24x7servermanagement »

Its a standard setup and with no customizations. How do i open a support ticket ?
24x7servermanagement
Posts: 13
Joined: Fri Oct 14, 2016 1:27 am

Re: Not able to delete Host and Services from CCM

Post by 24x7servermanagement »

[root@nagios scripts]# ./nagiosql_delete_host.php -host=secure104.netekmalta.com
URL: http://localhost/nagiosxi/includes/components/ccm/
Unable find host in nagiosql database
Usage: ./nagiosql_delete_host [--id=<host id>] [--host=<host_name>]

Same results while trying to delete the services.

But the host and its services are still showing up critical in Service Status page. There is no cron or api call.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Not able to delete Host and Services from CCM

Post by tgriep »

Lets see if restarting the Nagios daemons to see if the Services / Hosts go away.
Run this as root.

Code: Select all

service nagios stop
service ndo2db stop
killall -9 nagios
killall -9 ndo2db
service ndo2db start
service nagios start
Try that and let us know if this resolves the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
24x7servermanagement
Posts: 13
Joined: Fri Oct 14, 2016 1:27 am

Re: Not able to delete Host and Services from CCM

Post by 24x7servermanagement »

Thanks, It worked !
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Not able to delete Host and Services from CCM

Post by tgriep »

That for responding, that is good news!
I will mark the post as solved and lock it. If you have any new questions, feel free to open a new post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked