Service not removed even after removing the host from config

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Service not removed even after removing the host from config

Post by Pratapa »

Hi,

We faced a problem today.

There is a service called "Total - Processes" on one of the servers say host4. We need to remove this service from monitoring.

I have removed the hostname(host4) from the service definition in the service configuration file. Restarted Nagios service.

But service is not getting removed from monitoring. It is still showing. What could be the problem?


define service {
use linux-service-template,Total-Process-Template
host_name host1,host2,host3,host4
contact_groups linux-os-admins
}

Regards,
Pratapa.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service not removed even after removing the host from co

Post by scottwilkerson »

can you search for the service name in all of the configuration directory, such as

Code: Select all

grep "Total - Processes" -R /usr/local/nagios/etc
Also, it looks from you example that host4 is still in this config
Pratapa wrote:define service {
use linux-service-template,Total-Process-Template
host_name host1,host2,host3,host4
contact_groups linux-os-admins
}
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked