Email Notifications
Patrick Morris
patrick.morris at hp.com
Fri Feb 15 00:36:11 CET 2008
On Thu, 14 Feb 2008, Gregory Wong wrote:
> Hi Everyone,
>
> I am having a problems with email notifications. They are not being sent. Below is the command from the commands.cfg that is being executed. I changed /usr/bin/printf to /usr/bin/mail. Is this wrong?
>
> Thanks.
>
> define command{
> command_name host-notify-by-email
> command_line /usr/bin/mail "%b" "***** Nagios 2.6 *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
> }
Yes, that command is most definitely wrong, and will not work.
In particular, the "| -s" portion is going to cause major breakage.
-------------------------------------------------------------------------
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