Script de verificação Megaraid LSI/Dell Raid
———
#!/bin/bash
email=example@domain.com
ldDrive=`/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL`
pdDrive=`/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL`
echo '\n\n'
if (echo "$pdDrive" |grep -iq failed ) || (echo "$ldDrive" |grep -iq degraded )
then
echo $pdDrive | mailx -s "Drive Failed on $HOSTNAME " $email
fi
exit 0
11:51
Execute o script a cada 6 horas em cron no para conferir o MegaCLI.