COMMENT Macros
Thomas Guyot-Sionnest
dermoth at aei.ca
Fri Aug 29 00:08:29 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 28/08/08 11:30 AM, Ryan Gravlin wrote:
> 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.
Did you mean to use $NOTIFICATIONCOMMENT$ ?
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFItyHc6dZ+Kt5BchYRAlQDAKDZMR5p/JLZo85ZWaRjACLEmEK/sQCgw4VC
YFJSgDZLfBD7MY6/YatHh9k=
=fe1/
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
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