Your Mail Command

Tom DE BLENDE (GCC) Tom.DeBlende at dhl.com
Wed Oct 13 15:06:14 CEST 2004


/bin/echo -e '***** Nagios 2.0 *****\n\nNotification Type: 
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: 
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: 
$DATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\nDuration: 
$SERVICEDURATION$' | REPLYTO=tom.deblende at dhl.com /usr/bin/mutt -s '** 
$NOTIFICATIONTYPE$ alert - $HOSTALIAS$: $SERVICEDESC$ is $SERVICESTATE$ 
**' $CONTACTEMAIL$

Josiah Ritchie wrote:

>Just out of dull curiosity and wondering if I can learn something or get
>some good ideas for improvement, I'm wondering if everyone wouldn't mind
>sharing the command they use to send email from nagios out to others.
>
>I'll start:
> /usr/bin/printf "Subject: ** $NOTIFICATIONTYPE$ alert -
>$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\n **\n %b" "***** Nagios 
>*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
>$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
>$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" |
>/usr/sbin/ssmtp $CONTACTEMAIL$
>
>This is mostly the default modified so that I can use ssmtp, a simple ssmtp
>daemon allowing me to send email to others, but it does not receive
>anything. Configuration is also incredibly simple. I use it on a number of
>my Gentoo boxes so they can talk back to me. I moved the Subject line into
>the first line of the body of the message to be compatible with ssmtp.
>
>JSR/
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
>Use IT products in your business? Tell us what you think of them. Give us
>Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
>http://productguide.itmanagersjournal.com/guidepromo.tmpl
>_______________________________________________
>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
>  
>



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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