Question for macros for host-notify-by-email

Hendrik Baecker b00mer at gmx.net
Wed Mar 23 11:49:27 CET 2005


Holger Wirtz schrieb:

>Hi all,
>
>I have a simple problem with my configs for the host-notify-by-email
>command. I have defined the following:
>
>define command{
>        command_name    host-notify-by-email
>        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $DATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
>        }
>
>But inside the email I got this:
>
>--- cut here ---
>***** Nagios  *****
>
>Notification Type: PROBLEM
>Host: bla.fasel.org
>State: DOWN
>Address: 222.211.200.2
>Info: $
>
>Date/Time: $
>--- cut here ---
>
>Seems that the macros for $DATETIME$ and $OUTPUT$ have changed or what is
>the problem?
>
>Regards, Holger
>  
>
Hi,

if you are using a Nagios 2.x it might be that your macros have changed.

See here:
http://nagios.sourceforge.net/docs/2_0/macros.html
or for older Versions:
http://nagios.sourceforge.net/docs/1_0/macros.html

Regards,
Hendrik


-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
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