Lack of "Additional Info" in alerts

Bryan K. Walton zxcvbnm at tds.net
Mon Sep 15 23:07:04 CEST 2003


Hi Matt,
	Thanks for your reply.  I had not thought to try the periods
before and after $OUTPUT$.  That got my brain thinking in the right direction
After trying a couple of variations in the
syntax, I found my problem -- I needed to add a "\n\n" immediately
after $OUTPUT$.  Not sure why, but that fixed it for me.

Thanks everybody!
Bryan

On Mon, Sep 15, 2003 at 04:36:40PM -0400, Matt Pounsett wrote:
> 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).


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