Nagios - Default Email Notification

Marc Powell marc at ena.com
Tue Feb 10 23:19:54 CET 2004


On Tuesday, February 10, 2004 3:49 PM, Frank Candela shared with us:

> I am running Nagios 1.1 and I am wondering if there is a way to
> change the default email notifications sent by Nagios? 

Sure, in your commands file, edit the notification command you want to
change (i.e. notify-by-email, host-notify-by-email,
service-notify-by-email, etc). They're just echo'ing text to /bin/mail.
They're pretty straightforward once you see them :

# 'service-notify-by-email' command definition
define command{
        command_name    service-notify-by-email
        command_line    /bin/echo -e "Subject: Service $SERVICEDESC$
$SERVICESTATE$ alert for $HOSTNAME$!\n\n***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$SERVICESTATE$\nAddress: $HOSTADDRESS$\n\nService: $SERVICEDESC$\nInfo:
$OUTPUT$\n\nDate/Time: $DATETIME$\n" | /bin/mail -s '**
$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$
**' $CONTACTEMAIL$
        } 

--
Marc


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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