I have a host which has notification off based on a template. This looks fine, and shows up properly in the object.cache. I have a service for that host with notification enabled. This looks fine, and shows up properly in the object.cache. The retention file look like the object chace file for the service and host.
When the service goes down, i recieve an email that the service is down. I do not expect to get notified, since the notifications for the host are off.
I thought that if the host notification in disabled then any services on that host would not send a notification. I thought that the filter would be check if host has notification enabled.
Question: If host notification is disabled, should I recieve any service notification.
I solved the problem. The contact configuration was incorrectly configured. my bad.
I had been working on adding direct email to internet paging services - ATT, SPRINT. I inapproriately added a service_notification_commands to the host line:
I am not sure why this would cause the problem. But after I removed the notify-by-epager on the host line. Nagios started working properly.
Lasty, we have an outsourced vendor which monitors and manages our hosts, circuits and vpns. We use Nagios to monitor these same hosts. However, we do not want to take any emails or pages.
Nagios can get very chatty with it’s emails sometimes, especially if it’s configured wrong. Nobody here at work wants to get emails either, so we have them turned off, just like you have. Instead, we just periodically take a look at the service status page to see if anything is wrong, or if something is wrong, we look at it, to find out what is broken.
define service{
name generic-service ; The ‘name’ of this service template, referenced in other service definitions
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness’
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
As shown, I have removed the contact_groups for the services. This has stopped notifications going out. I a going to test and see if it will send email properly when the host is set to email.