notify-by-email not displaying complete info
Sean McAvoy
sean.mcavoy at megawheels.com
Tue Feb 18 19:22:00 CET 2003
Hello,
I'm having a problem with the default 'notify-by-email' command. The
system registers the problem correctly (i.e. warning/critical, output is
there, etc.), but when it sends the notification information is missing.
I added a couple of things to output to a file, then pipe the output of
the file to mail to see what I could see (which was the exact same
thing).
It seems like not all of the information is being substituted (i.e.
$SERVICESTATE$ is blank).
I've included the email notification I receive as well as the command
that is being run for the notification.
Any suggestions would be appreciated
Command:
# 'notify-by-email' command definition
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b" "***** Nagios 1.0
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$"
> /tmp/notify.log && cat /tmp/notify.log | /usr/bin/mail -s "**
$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$
**" $CONTACTEMAIL$
}
email received (hostname,alias remove to protect the innocent):
***** Nagios 1.0 *****
Notification Type: PROBLEM
Service:
Host: [HOST_ALIAS]
Address: [FQDN]
State:
Date/Time: Tue Feb 18 11:58:06 EST 2003
Additional Info:
(No output!)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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