Host Notification Problem
Bill Kintz
bkintz at smtp.aed.org
Wed Jun 28 22:27:56 CEST 2006
The problem I am having is that my service notifications are being sent and delivered properly, but host notifications being sent to the exact same contact are never being delivered, even though nagios indicates they were sent.
Here are the pertinent config snippets:
- contacts.cfg:
# 'netops' contact definition
define contact{
contact_name netops
alias netops
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email xxx at xxx.xxx
}
- misccommands.cfg:
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /usr/bin/printf "%b" "Date/Time: $LONGDATETIME\nInfo: $HOSTOUTPUT$\n" | /usr/bin/mail -s "$HOSTSTATE$ alert for $HOSTNAME$" $CONTACTEMAIL$
}
# 'notify-by-email' command definition
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b" "Date/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ " $CONTACTEMAIL$
}
- from /var/log/messages:
Jun 28 15:52:38 watchdog-sldc nagios: SERVICE NOTIFICATION: netops;HYPERIONSQL-2KDC;check_nt_cpuload;OK;notify-by-email;CPU Load 81% (5 min average) 84% (15 min average) 84% (30 min average) 52% (60 min average)
Jun 28 15:56:36 watchdog-sldc nagios: HOST NOTIFICATION: netops;NWWEB1-NWDC;DOWN;host-notify-by-email;CRITICAL - Plugin timed out after 10 seconds
(The 15:52 service notification was received. the 15:56 host notification was not, even though nagios clearly believes it was sent. )
Running nagios in non-daemon mode and forcing NWWEB1-NWDC up and down generated the following console message:
Nagios 2.1 starting... (PID=25864)
Send options without primary recipient specified.
Usage: mail [-BFintv~] [-s subject] [-a attachment] [-c cc-addr] [-b bcc-addr] [-r from-addr] [-h hops] [-R reply-addr] to-addr ... [- sendmail-options ...]
mail [-BeHiInNv~] [-T name] -f [name]
mail [-BeinNv~] [-u user]
Logic tells me that something is wrong with the host-notify-by-email command setup that is causing mail to be unhappy, but I've been over this about a zillion times and simply can't see the problem, which means I'm probably overlooking something incredibly stupid and simple.
Any insight would be most greatly appreciated.....
* Bill K.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list