Setting up a script to monitor your RAID array is very useful.
The script below will report the status and go into critical state if the 7th field is not “OK”.
#!/usr/local/bin/bash
LOG=/tmp/raid_status.out
sudo /usr/sbin/hpacucli ctrl slot=0 logicaldrive all show status > $LOG
if [ $(awk ‘$7==”OK”‘ $LOG | wc -l) -eq 1 ]
then
echo “OK: $(awk ‘$7==”OK” {print}’ $LOG | sed ‘s!^ *!!g’)”
exit 0
else
echo “CRITICAL: $(awk ‘/logicaldrive/{print}’ /tmp/raid_status.out)”
exit 2
fi