Page 1 of 1

Service not removed even after removing the host from config

Posted: Tue Nov 12, 2019 4:53 am
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.

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

Posted: Tue Nov 12, 2019 1:58 pm
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
}