Lack of "Additional Info" in alerts

Matt Pounsett matt.pounsett at cira.ca
Mon Sep 15 22:36:40 CEST 2003


On Mon, 15 Sep 2003, Bryan K. Walton wrote:

> Hi everybody,
> 	Can someone tell me where $OUTPUT$ is defined?  My
> notify-by-email command definition is looking for that, and I am
> wondering if perhaps I simply need to define it somewhere.

$OUTPUT$ is the last line of data returned from a command's command_line..
Like $NOTIFICATIONTYPE$ or $SERVICESTATE$, it is set when a command is run, so
you won't see a definition for it anywhere.

> # 'notify-by-email' command definition
> define command{
>         command_name    notify-by-email
>         command_line    /usr/bin/printf "%b" "***** Nagios 
> *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
> $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:
>  $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
> $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /usr/bin/mail -s "**
> $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SE
> RVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$

Assuming that the line wraps are a result of your email client, and not the
way this is entered into your commands file, and assuming the paths to
'printf' and 'mail' are correct for your system, I don't see any obvious
problems with this.

For testing purposes, you might want to try adding other data around $OUTPUT$
to see if anything else gets truncated.  .$OUTPUT$. instead of $OUTPUT$ for
example, and check to see if both periods turn up in your email.  This sort of
thing could lead you to conclude whether it is or is not the notification
command syntax which is at fault, or the check command (which might not be
returning any output).

-- 
Matt Pounsett                 CIRA - Canadian Internet Registration Authority
Technical Support Programmer                    350 Sparks Street, Suite 1110
matt.pounsett at cira.ca                                 Ottawa, Ontario, Canada
613.237.5335 ext. 231                                      http://www.cira.ca



-------------------------------------------------------
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