Re: E-mail Notification Issue
Christian Franke <[email protected]>
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Message-ID | <[email protected]> |
Lorne Wanamaker wrote: > Hello, > > I am having a hard time getting e-mail notifications from smartd. here > is is my smart.conf > > /dev/sda -a -d megaraid,4 -a -s (S/../.././02|L/../../6/03) > /dev/sda -a -d megaraid,5 -a -s (S/../.././02|L/../../6/05) > /dev/sda -a -d megaraid,6 -a -s (S/../.././02|L/../../6/07) > /dev/sda -a -d sat+megaraid,7 -a -s S/../.././02 > /dev/sda -a -d megaraid,4 -H -m [email protected] > <mailto:[email protected]> -M exec /usr/local/bin/smartdnotify > > Here is smartdnotify contents: > > #! /bin/sh > > # Send mail > echo "$SMARTD_MESSAGE" | mail -s "$SMARTD_FAILTYPE" "$SMARTD_ADDRESS" If $SMARTD_ADDRESS is quoted, this will not work if -m directive specifies multiple addresses. > > # Notify user > wall "$SMARTD_MESSAGE" > > I tested sendmail and it works fine. Do I need to add the bottom line > for each device? Or is there a way to make one line send for warnings > on all devices? Insert a "DEFAULT" line with common configuration before the first device specific configuration: DEFAULT -m ADDR1,ADDR2 -M exec /usr/local/bin/smartdnotify /dev/sda ... ... See smartd.conf man page. Thanks, Christian ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/