Service Notification

I am having a problem with notification. I know the email is working correctly because if i manually send an email for a service from the “Service Information” page using “Send Custom Service Notification” i get an email but when the same service goes into critical mode i don’t get any notifications.

I am new to Nagios and new to Linux so be gentle.

Thanks for any help i can get.

Is Nagios generating a notification? see the notifications page :slight_smile:

The only thing that is list on the Notifications page are the notifications that i generate manually.

Then you have a configuration problem, this (nagios.sourceforge.net/docs/3_0/ … tions.html) is a good starting point to see what you need to check, step by step. :slight_smile:

I have read what you suggested over and over and over again but i still cannot get this worked out. If i press “Send Custom Service Notification” in the Service Information page i get an email exactly what i would expect and it uses the correct notificaion command to send the email. However, for the life of me i cannot get the email to be sent out automatically. Here is some of the config files i am using. One thing to note is that the email addresses have been verified to be working. i didn’t keep the real addresses for obvious reasons.

Yes i have switched it off and on and on again and off and restarted and reloaded and rebooted…

define service {
host_name Mill_Services_Truck_ESP902
service_description Ping_Mill_Services_Truck_ESP902
check_command check_ping!400,80%!500,80%
initial_state o
max_check_attempts 1
check_interval 1
retry_interval 1
active_checks_enabled 1
check_period 24x7
check_freshness 1
notification_interval 5
notification_period 24x7
notification_options u,r,c,s
notifications_enabled 1
contact_groups rts
register 1
}

define host {
host_name Mill_Services_Truck_ESP902
alias Mill_Services_Truck_ESP902
address 999.99.160.170
initial_state o
max_check_attempts 1
check_interval 20
retry_interval 5
active_checks_enabled 1
check_period 24x7
check_freshness 1
contact_groups rts
notification_interval 5
notification_period 24x7
notification_options d,u,r,s
notifications_enabled 1
register 1
}

define contactgroup {
contactgroup_name rts
alias rts support
members Don,Tim
}

define contact {
contact_name Don
alias Don
contactgroups rts
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s,n
service_notification_options w,u,c,r,f,s,n
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
retain_status_information 1
email don@the_company.com
}

define contact {
contact_name Tim
alias Tim
contactgroups rts
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s,n
service_notification_options w,u,c,r,f,s,n
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
email tim@the_company.com
}

At a first look it seems ok, what do you have in the service status page?
when the host goes down is the service seen as down? (should be in the logs too) do you only get SOFTdown stauses or HARD down too (which is what triggers the ntoifcation).

What version of nagios did you install? source or RPM?

Luca

Actually, what i was able to figure out was that the on the contact configuration host_notification_options d,u,r,f,s,n and service_notification_options w,u,c,r,f,s,n should be host_notification_options d,u,r,f,s and service_notification_options w,u,c,r,f,s

There should not be an “n”. If there is an “n” that means “none” and takes precedence over any other option. Once i remove the “n” i started getting emails.

Thanks for your help.