COMMENT Macros
Ryan Gravlin
rgravlin at elizacorp.com
Thu Aug 28 17:30:28 CEST 2008
Hello all,
I'm trying to include the comments that operators add to host/service acknowledgements. I currently have this setup as the NOTIFY COMMAND:
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nComment: $NOTIFICATIONAUTHORCOMMENT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
Using Nagios 3.0.3. All I receive is "Comment: $" in the actual e-mail. I assume I'm missing something obvious but I haven't done much custom macro stuff in Nagios before and I was hoping someone else could shed some light?
I do understand I may need to add additional notify commands due to the use of the $NOTIFICATIONAUTHORCOMMENT$, but this test is a also on a down host, not a service.
Thanks,
Ryan Gravlin
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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