Disable Notifications for Service via 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
and1100
Posts: 93
Joined: Mon Mar 25, 2013 8:37 am

Disable Notifications for Service via Config

Post by and1100 »

Hi,

I am trying to leave a service check on but disable the notification emails that the check would send. Ideally, I'd want to make this change within the config file on the Nagios service. I've tried the following:

- removed the contact/contact groups in the service check. When I do this, it sends email to our primary alerting distro. I wasn't sure what superseded that.
- added enable_notifications = 0 to the service check. Didn't seem like this did anything.

Any assistance would be greatly appreciated!
and1100
Posts: 93
Joined: Mon Mar 25, 2013 8:37 am

Re: Disable Notifications for Service via Config

Post by and1100 »

Just to append this, if I wanted to disable notifications for a host itself, is the method the same? Thanks.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Disable Notifications for Service via Config

Post by bwallace »

added enable_notifications = 0 to the service check
This is correct -
"notifications_enabled *: This directive is used to determine whether or not notifications for this service are enabled. Values: 0 = disable service notifications, 1 = enable service notifications.
Refer to https://assets.nagios.com/downloads/nag ... tions.html

Did you restart Nagios for the change to take effect?

I know you said you'd prefer to make this change within the config file, but it's quite easy to do via the UI:
Current Status (left side menu) > Services... click on the Service or Host that you want to disable notifications for. On the right hand side "Host Commands" or "Service Commands" > click on "Disable notifications for this host" or "Disable notifications for this service".
Be sure to check out the Knowledgebase for helpful articles and solutions!
Locked