missing info in notifications
Marc Powell
marc at ena.com
Mon Mar 10 04:18:25 CET 2008
On Mar 9, 2008, at 10:11 PM, Nelson Serafica wrote:
> Thanks. My host_notification_commands is notify-by-email. Here is
> the snippet of notify-by-email:
>
> define command{
> command_name notify-by-email
> command_line /usr/bin/printf "%b" "***** Nagios *****\n
> \nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$
> \nHost: $HO
> STALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/
> Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/
> mail -s "**
> $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is
> $SERVICESTATE$ **" $CONTACTEMAIL$
> }
>
> If macros are not enabled, why $HOSTALIAS$ and $HOSTADDRESS$ has a
> value? Do you think the problem is in the services.cfg only because
> most of the missing variables is related to services?
Macros are always enabled but in your case, $SERVICE*$ macros don't
make any sense for host notifications and aren't available for them.
They're only valid for service notifications. You need to use the
corresponding $HOST*$ macros as detailed on the macros documentation.
The sample config files ship with a notify-by-email for service
notifications and host-notify-by-email for host notifications. You
should see if you already have one defined and use it instead.
--
Marc
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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