Variable showing $ in email & pages?
Stephan Janosch
stephan.janosch at interface-business.de
Fri Jan 28 15:34:10 CET 2005
Bill Akins wrote:
> Hi all,
>
> I am running Nagios 2.0b1 on RedHat Enterprise 3 (kernel
> 2.4.21-27.0.2.ELsmp).
>
> I have recently installed Nagios and have 99 hosts and almost 200
> services defined and monitoring works great! I am having a very minor
> problem with alerting. I get the messages by email and pager, but it
> seems Nagios is passing the variable for datetime & output as an empty
> and is catching the trailing $ as shown below:
>
> ***** Nagios *****
>
> Notification Type: RECOVERY
>
> Service: MTA
> Host: GroupWise Server 0
> Address: AAA.BBB.CCC.DDD
> State: OK
>
> Date/Time: $
>
> Additional Info:
>
> $
>
> The relevant sections of misccommands.cfg follow:
>
> # '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$"
> | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$
> is $SERVICESTATE$ **" $CONTACTEMAIL$
> }
>
>
> # 'notify-by-epager' command definition
> define command{
> command_name notify-by-epager
> command_line /usr/bin/printf "%b" "Service:
> $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState:
> $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$" | /bin/mail -s
> "$NOTIFICATIONTYPE$: $HOSTALIAS$: $SERVICEDESC$ is $SERVICESTATE$"
> $CONTACTPAGER$
> }
>
> Any clues on this one? It's not a show-stopper since email and pages
> have a time stamp, but I would like to have it working before I show the
> boss what Nagios can do for us.
>
> Thanx!
>
The time macros changed. Look into the last changelog. You should be
able to fix that, quiet easyly(?).
Stephan
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
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