How to stop/Disable Nagios email notifications

How Can I stop the email notifications. I am setting up a new server and getting tons of notifications. Wants to disable them for time being.


Click on "Process Info" in the left nav pane, and then "Disable Notifications", then "Commit".


in nagios.cfg, set enable_notifications=0 and restart nagios


You can also do it at a contact level, by disabling notifications for your Nagios contact. E.g.:

define contact { 
    contact_name JohnDoe
    email [email protected]
    host_notifications_enabled 0
    service_notifications_enabled 0
}

The other way to skin this cat is to use the host_notification_options and service_notification_options in the contact definition. Set them to n (none).


You can also do this via NAGIOS's command_file named pipe, if you have that defined. The advantages of doing it this way are it's internal to NAGIOS, it can be programmed from at or cron rather than requiring interaction with a web browser, and it doesn't require changing any of the config files.

To disable notifications (on CentOS6 EPEL NAGIOS - other distributions may have the command_file configured elsewhere):

echo "[`date +%s`] DISABLE_NOTIFICATIONS" > /var/nagios/rw/nagios.cmd

and to re-enable it later:

echo "[`date +%s`] ENABLE_NOTIFICATIONS" > /var/nagios/rw/nagios.cmd

Set both:

  • service_notification_period &
  • host_notification_period

to never instead of 24x7