16.19. Setting up email notifications to monitor a RAID
You can set up email alerts to monitor RAID with the mdadm tool. Once the MAILADDR variable is set to the required email address, the monitoring system sends the alerts to the added email address. For more information, see the mdadm.conf(5) man page on your system.
Prerequisites
-
The
mdadmpackage is installed. - The mail service is set up.
Procedure
Create the
/etc/mdadm.confconfiguration file for monitoring array by scanning the RAID details:# mdadm --detail --scan >> /etc/mdadm.confNote, that
ARRAYandMAILADDRare mandatory variables.Open the
/etc/mdadm.confconfiguration file with a text editor of your choice and add theMAILADDRvariable with the mail address for the notification. For example, add new line:MAILADDR example@example.comHere, example@example.com is an email address to which you want to receive the alerts from the array monitoring.
-
Save changes in the
/etc/mdadm.conffile and close it.