FW: Not sending e-mails

Scott Miller srmiller at interbel.net
Fri Oct 2 01:02:28 CEST 2009


I actually go it to work using your suggestion - I double checked it, and
misspelled one word - fixed it, lowered the threshold to alarm, and
restarted - got a notification within about 5 min.

 

# NEW 'notify-host-by-email' command definition

define command{

        command_name    notify-host-by-email

        command_line    /usr/bin/printf "%b" "Subject:** $NOTIFICATIONTYPE$
Host Alert: $HOSTNAME$ is $HOSTSTATE$ **\n***** Nagios *****\n\nNotification
Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" |
/usr/sbin/sendmail.postfix $CONTACTEMAIL$

        }

 

# NEW 'notify-service-by-email' command definition

define command{

        command_name    notify-service-by-email

        command_line    /usr/bin/printf "%b" "Subject:** $NOTIFICATIONTYPE$
Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **\n***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$" | /usr/sbin/sendmail.postfix $CONTACTEMAIL$

 

Awesome - thanks!

 

http://65.19.234.227:10000

 

Scott Miller

 

 

From: mike.saldivar at directfinancialsolutions.com
[mailto:mike.saldivar at directfinancialsolutions.com] On Behalf Of Michael
Saldivar
Sent: Thursday, October 01, 2009 2:04 PM
To: Scott Miller
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] FW: Not sending e-mails

 

Did you try the two notification mail commands I sent over?  Postfix uses
different syntax than what comes in the default Nagios config, and the ones
I'm using are from a functional Ubuntu/Postfix setup.  It uses Postfix's
alias to sendmail instead of the mail command, which doesn't work with
Postfix.

-Mike




On Thu, Oct 1, 2009 at 3:53 PM, Scott Miller <srmiller at interbel.net> wrote:

I agree - I've found a few other oddities while messing around with Postfix.
Gotta fix those first.

 

Thanks,

Scott

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091001/1db36017/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
-------------- next part --------------
_______________________________________________
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