User Tools

Site Tools


computing:storage:lsi:megaraid_monitor

This is an old revision of the document!


Monitoring LSI SAS RAID Controllers on Linux

FIXME This page needs updating.

This configuration uses cron and the MegaCLI RAID configuration utility to monitor a Linux server with a newer LSI SAS RAID controller.

Warning messages are sent to the system administrator using the sendmail command.

The script checks for the controller to report it is running in 'Degraded' status. You might have it run from cron every 10 minutes.

XenServer

With XenServer, there is no 'mail' command nor MTA daemons running, but it does come with SSMTP installed. SSMTP is cool because you don't need an extra process running on your box and it eliminates a lot of problems you can run into with mail relaying.

Configure SSMTP

vim /etc/ssmtp/ssmtp.conf

root=admin@yourdomain.com
mailhub=mailserver.yourdomain.com:465
RewriteDomain=yourdomain.com
FromLineOverride=YES
UseTLS=YES
AuthUser=smtpuser
AuthPass=smtppassword

Test SSMTP

Test with no 'mail' command and no subject line:

echo test | ssmtp -v admin@yourdomain.com

Install the MegaCLI Utility

Log in as 'root', then:

cd ~ wget -O MegaCLI.zip http://www.lsi.com/DistributionSystem/User/AssetMgr.aspx?asset=56619 unzip MegaCLI.zip rpm -ivh MegaCli-8.01.06-1.i386.rpm Lib_Utils-1.00-08.noarch.rpm

Cron

I added this to my /etc/crontab:

# check for RAID array problems every 10 minutes and send out a message */10 * * * * root /root/raid-status-megacli.sh 2>&1

Script

I wrote this script. I just place it in the /root directory. You will want to edit the variables to fit your needs. More Info Cheat Sheet LSI MegaRAID SAS User's Guide

computing/storage/lsi/megaraid_monitor.1358805588.txt.gz · Last modified: 2013/01/21 14:59 by gcooper