notify-by-email

Jens.Bergmann at nordCom.net Jens.Bergmann at nordCom.net
Mon Oct 7 19:14:20 CEST 2002


Hi Tom,

/bin/echo -e 'Notification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nHostname: $HOSTNAME$ ($HOSTADDRESS$)\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$' | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}

is working well for me (but its not standard as i modfied subject and body of the mail :) )
(on debian)

jens

>-----Original Message-----
>From: Tom Welsh [mailto:twelsh at tcplan.net]
>Sent: Monday, October 07, 2002 6:42 PM
>To: nagios-users at lists.sourceforge.net
>Subject: [Nagios-users] notify-by-email
>
>
>Hi all 
>
>I've just moved from red hat to debian linux and am still experiancing 
>niggling probs with nagios. 
>
>My current one is that im not recieving any emails if i get warning 
>thresholds exceeded. 
>
>The first part was that the install was looking in /usr/sbin 
>for mail. I've 
>now changed the config to look in /usr/bin but i still dont 
>get any emails 
>from nagios. i can mail myself fine from the command line. 
>
>My notify-by-email command is vanilla straight from the install. 
>
># 'notify-by-email' command definition (ORIGINAL)
>define command{
>       name            notify-by-email
>       command_name    notify-by-email command_line    /usr/bin/printf 
>'Notification Type: $NOTIFICATIONTYPE$\n
>\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: 
>$HOSTADDRESS$\nState: 
>$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional 
>Info:\n\n$OUTPUT$' | 
>/usr/bin/mail -s ' $NOTIFICATIONTYPE$ alert - 
>$HOSTALIAS$/$SERVICEDESC$ is 
>$SERVICESTATE$ ' $CONTACTEMAIL$
>       } 
>
>Any ideas, i cant work it out, but thats not unusuall as im 
>probably stupid. 
>
>Cheers 
>
>Tom Welsh 
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>Nagios-users mailing list
>Nagios-users at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/nagios-users
>


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list