Email Notifications

Wilcox, Chris wilcoxc at troycorp.com
Thu Mar 13 00:28:20 CET 2003


Problem.
 
Using nullmailer.  When an example email is sent to nullmailer from the
command line it works fine.  But when Nagios generates an email it doesn't
get to me.
 
I have:
 
1)     Enabled notifications in Nagios.cfg
2)     Added a contact
3)     Added this contact to contact groups
4)     Made sure under Notifications that a notification was generated.
 
My send line in misccommands.cfg is:
 
# 'host-notify-by-email' command definition
define command{
            command_name            host-notify-by-email
            command_line   /usr/bin/printf "%b" "***** Nagios 1.0
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time:
$DATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!"
$CONTACTEMAIL$
            }
 
This line when executed from the command line works.
 
Host#/bin/printf "Nagios 1.0" | /bin/mail -s "Host alert for hosta"
emailaddress at mydomain.com <mailto:emailaddress at mydomain.com> 
 
Any help here appreciated.
 
Chris Wilcox
Manager Network Services
Troy Corporation
973-443-4200 x2545
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030312/44f6e9f7/attachment.html>


More information about the Users mailing list