PDA

View Full Version : No Notifications generated, even on hard state change


djinn
05-31-2006, 03:43 AM
Hello everyone,

I hope someone can help me with this, because I love what nagios and oreon do, but I am about to lose my mind over it.

I have installed nagios and oreon on four different boxes (Solaris, Debian, and Fedora) and I have had the same problem on all three installations. Notifications are not generated no matter what. For this reason I believe that I am doing the same simple thing wrong every time.

Current System:
Fedora Core 4 (2.6.11-1.1369_FC4)
Nagios 1.4.1
Oreon 1.3 Beta1

On this box I have forced several hard state changes and notifications are never generated. At first I thought that it was the emailer command that wasn’t working, but I changed @emailer@ to /bin/mail and tested the command from the command line as user nagios and it worked fine.

Then I looked in “View Notifications This Host” and it says “No notifications have been recorded for this host in the current log file”. This is the very same host that the log shows a hard state change for in “View Status Detail For This Host”.

Below are some excerpts from the relevant config files for the service that forced to a hard state:

cat nagios.cfg |grep notifications
enable_notifications=1
log_notifications=1

cat contacts.cfg
define contact{
contact_name <MyName> (no spaces)
alias <alias>
host_notification_period 24x7
service_notification_period all
host_notification_options d,u,r,n
service_notification_options w,u,c,r,n
host_notification_commands host-notify-by-email, notify-by-email
service_notification_commands host-notify-by-email, notify-by-email
email <my-email-address>
}

cat contactgroups.cfg
define contactgroup{
contactgroup_name Admins
alias Admins
members <MyName>
}

cat services.cfg
define service{
hostgroup_name WebServers
service_description http
is_volatile 1
check_command check_http
max_check_attempts 1
normal_check_interval 1
retry_check_interval 1
active_checks_enabled 1
passive_checks_enabled 1
check_period 24x7
parallelize_check 1
obsess_over_service 1
check_freshness 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
notification_interval 1
notification_period 24x7
notification_options w,u,c,r
notifications_enabled 1
contact_groups Admins
}


tail /usr/local/nagios/var/nagios.log

Tue May 30 16:40:38 PDT 2006

[1149032655] SERVICE ALERT: www.<host>.com;http;CRITICAL;HARD;1;Connection refused
[1149032684] EXTERNAL COMMAND: DISABLE_HOST_SVC_NOTIFICATIONS;www.<host>.com
[1149032692] EXTERNAL COMMAND: ENABLE_HOST_SVC_NOTIFICATIONS;www.<host>.com
[1149032704] EXTERNAL COMMAND: SCHEDULE_HOST_SVC_CHECKS;www.<host>.com;1149032703
[1149032705] SERVICE ALERT: www.<host>.com;http;CRITICAL;HARD;1;Connection refused
[1149032709] EXTERNAL COMMAND: SCHEDULE_HOST_SVC_CHECKS;www.<host>.com;1149032708
[1149032712] EXTERNAL COMMAND: SCHEDULE_HOST_SVC_CHECKS;www.<host>.com;1149032711
[1149033795] SERVICE ALERT: www.<host>.com;http;CRITICAL;HARD;1;Connection refused
[1149033855] SERVICE ALERT: www.<host>.com;http;CRITICAL;HARD;1;Connection refused
[1149033915] SERVICE ALERT: www.<host>.com;http;CRITICAL;HARD;1;Connection refused
[1149033975] SERVICE ALERT: www.<host>.com;http;CRITICAL;HARD;1;Connection refused
[1149034035] SERVICE ALERT: www.<host>.com;http;CRITICAL;HARD;1;Connection refused
[1149034095] SERVICE ALERT: www.<host>.com;http;CRITICAL;HARD;1;Connection refused

Tue May 30 17:10:11 PDT 2006

[1149034215] SERVICE ALERT: www.<host>.com;http;CRITICAL;HARD;1;Connection refused
[1149034275] SERVICE ALERT: www.<host>.com;http;OK;HARD;1;GET / HTTP/1.0

Tue May 30 17:19:29 PDT 2006

Lots of hard state changes but no notifications!

Is there some service or process that runs that is supposed to generate the notifications that I have somehow missed?


Thank you in advance for your help! :?