FW: Email notification
Morris, Patrick
patrick.morris at hp.com
Mon Apr 30 22:08:39 CEST 2007
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net
> [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf
> Of "Valdinger, Stephen (DOV, MSX)"
> Sent: Monday, April 30, 2007 12:33 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] FW: [Nagios-users] Email notification
>
> This is what I have in my config file for notify-service-by email as
> well as host
>
> I have postfix up and running, yet Nagios still won't alert, what is
> wrong with this?
>
>
> Command_line mail "%b" "***** Nagios *****\n\nNotification Type:
> $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
> $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
> $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | -s "**
> $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$
> **" stephen.valdinger at doverchem.com
I'd recommend going back to the original notification commands. Yours is
broken and/or suboptimal in several ways:
1. You've hard-coded a recipient address. Nagios will pull the address
it needs to use from your configs.
2. Many of your macros are host-specific and will not work for service
notifications.
3. You're passing printf command to the mail command.
4. You're piping the results to nowhere.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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