LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   RAID mdadm - Sending E-Mails on RAID Failure? (http://www.linuxquestions.org/questions/linux-general-1/raid-mdadm-sending-e-mails-on-raid-failure-608900/)

rootking 12-24-2007 10:36 AM

RAID mdadm - Sending E-Mails on RAID Failure?
 
I've seen how you must add the MAILADDR line to your /etc/mdadm.conf file to tell mdadm that you want to send an email to this address when your RAID is degraded. The problem is that I need to know the easiest way to send out that e-mail w/o configuring a mail server on this machine.

Is there a quick way of sending an e-mail when mdadm detects a degraded array?

thanks for any help

twantrd 12-25-2007 03:59 AM

Then you'll need to write a script. Perhaps something that:

1. Checks the container and when it sees a failed drive, touch a file.
2. Put that script into cron and have it run every 10 mins or so
3. Have a different machine with sendmail or whatever MTA you have and ssh into the machine and check if the file exists
4. If it does, then fire the mail.

-twantrd


All times are GMT -5. The time now is 09:38 AM.