<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 12pt Tahoma">Thanks for all of the responses.  Alerting is fully reporting now.<BR><BR>>>> Subhendu Ghosh <sghosh@sghosh.org> 1/28/2005 9:27 AM >>><BR>
<DIV style="COLOR: #000000">On Thu, 27 Jan 2005, Bill Akins wrote:<BR><BR>> Hi all,<BR>><BR>> I am running Nagios 2.0b1 on RedHat Enterprise 3 (kernel<BR>> 2.4.21-27.0.2.ELsmp).<BR>><BR>> I have recently installed Nagios and have 99 hosts and almost 200<BR>> services defined and monitoring works great!  I am having a very minor<BR>> problem with alerting.  I get the messages by email and pager, but it<BR>> seems Nagios is passing the variable for datetime & output as an empty<BR>> and is catching the trailing $ as shown below:<BR>><BR>> ***** Nagios  *****<BR>><BR>> Notification Type: RECOVERY<BR>><BR>> Service: MTA<BR>> Host: GroupWise Server 0<BR>> Address: AAA.BBB.CCC.DDD<BR>> State: OK<BR>><BR>> Date/Time: $<BR>><BR>> Additional Info:<BR>><BR>> $<BR>><BR>> The relevant sections of misccommands.cfg follow:<BR>><BR>> # 'notify-by-email' command definition<BR>> define command{<BR>>        command_name    notify-by-email<BR>>        command_line    /usr/bin/printf "%b" "***** Nagios<BR>> *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:<BR>> $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:<BR>> $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$"<BR>> | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$<BR>> is $SERVICESTATE$ **" $CONTACTEMAIL$<BR>>        }<BR>><BR>><BR>> # 'notify-by-epager' command definition<BR>> define command{<BR>>        command_name    notify-by-epager<BR>>        command_line    /usr/bin/printf "%b" "Service:<BR>> $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState:<BR>> $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$" | /bin/mail -s<BR>> "$NOTIFICATIONTYPE$: $HOSTALIAS$: $SERVICEDESC$ is $SERVICESTATE$"<BR>> $CONTACTPAGER$<BR>>        }<BR>><BR>> Any clues on this one?  It's not a show-stopper since email and pages<BR>> have a time stamp, but I would like to have it working before I show the<BR>> boss what Nagios can do for us.<BR>><BR>> Thanx!<BR>><BR><BR>You are using the commands definitions from 1.x and some of the macros <BR>have changed in 2.0 to support the new features...<BR><BR>$OUTPUT$ should be $SERVICEOUTPUT$ or $HOSTOUTPUT$ depending on the <BR>notification<BR><BR>$DATETIME$ should be $LONGDATETIME$ or $SHORTDATETIME$ and depends on the <BR>date_format directive in nagios.cfg<BR><BR>-- <BR>-sg<BR></DIV></BODY></HTML>