Notifications didn't fire


#1

Hi:

Over the past weekend, I noticed that Nagios didn’t send out any notifications when a service (MSSQL) died on a host recently. The outage is clearly logged, but no notifications fired, not even in the notifications log.

Notifications are enabled on the service template - in fact, nothing is disabled anywhere in the system. I get other notifications from the system so I know the email chain itself is fine.

Version is 2.0b3.

Any ideas on what could have gone wrong here?


#2

Check the notifications the service definiton has… If all else work it should be there. Are the admin contacts correct?

Luca


#3

Here are the relevent config file entries…

define contact{
contact_name Ron
alias Ron Gage
service_notification_period 24x7
host_notification_period 24x7
service_notification_options u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email ron.gage@altiris.com
address1 ron.gage@altiris.com
}
define contactgroup{
contactgroup_name tester
alias System Test
members Ron
}
define host{
name testhost ; The name of this host tem
notifications_enabled 1 ; Host notifications are enable
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information acr
retain_nonstatus_information 1 ; Retain non-status information
register 0 ; DONT REGISTER THIS DEFINITION
max_check_attempts 1
notification_interval 60
notification_period 24x7
notification_options d,r
contact_groups tester
}
define host{
use testhost
host_name test_server
address 172.22.7.93
check_command check-host-alive
}
define service{
name test-service ; The ‘name’ of this servi
active_checks_enabled 1 ; Active service checks are ena
passive_checks_enabled 1 ; Passive service checks are en
parallelize_check 1 ; Active service checks should
obsess_over_service 1 ; We should obsess over this se
check_freshness 0 ; Default is to NOT check servi
notifications_enabled 1 ; Service notifications are ena
event_handler_enabled 1 ; Service event handler is enab
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information acr
retain_nonstatus_information 1 ; Retain non-status information
check_period 24x7
is_volatile 0
max_check_attempts 1
normal_check_interval 5
retry_check_interval 1
contact_groups tester
notification_interval 60
notification_period 24x7
register 0 ; DONT REGISTER THIS DEFINITION
}
define service{
use test-service
host_name test_server
service_description HTTP
check_command check_http
}


#4

Try this, use the cgi page to disable notifications and then enalbe them again using the cgi page.


#5

I already tried this - both at the host level as well as at the service level. NO difference, notifications for services still do not fire…


#6

You are going to have to look at all the setting in the config files for this, and find the ONE typo that I am sure is there somewhere.

Also, check the file /var/spool/mail/nagios and it should be zero bytes.
If not, su - nagios and read the mail by typing:
mail
I have that from time to time, and the problem is not nagios, but with delivering email to the server.


#7

Looks like you’re missing a “notification_options” setting in your service definitions. You’ve got it for the host, but you’ll probably need to set it for services, too. At least, that’s how my config is running (v. 2.0b4).