Notification Logic


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.


Yes you should but I fail to see why you have it configured that way.

If you want to be notified about a service failure, then why would you NOT want to be notified about a host failure? I’m confused.

If you don’t want to be notified about a service check, then just turn of notifications for that service.


Thanks for the quick reply.

I solved the problem. The contact configuration was incorrectly configured. :frowning: 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:

service_notification_commands notify-by-email
host_notification_commands host-notify-by-email, notify-by-epager

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.


Well. I spke too soon.

It worked for a couple of hours. I had multiple alerts and no email - as expected. But, it then started sending emails for alerts.

Since it is Friday, I just removed all those hosts.

I am using Version 2.0b4, which I upgraded last Sunday. I think maybe, Ill moe it back to Version 2.0b2.


I have re-examined the service.cfg:

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



define service{
use generic-service
host_name *
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1

contact_groups on-call

  notification_interval      120
  notification_period      midwest6to9
  notification_options      w,u,c,r
  check_command      check-host-alive

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.