I wrote a basic Nagios plugin named nagios_3ware_raid_check to monitor the status of RAID arrays on 3ware/LSI hardware RAID controllers, but it was pretty limited.
Today I got a chance to improve it as I needed it for some machines at work; it now automatically figures out which card(s) are present, and checks the status of each RAID array on it. This means you don’t need to configure it to know which card number and unit to monitor, it just Does The Right Thing.
It uses the tw_cli utility available from the LSI website, which supports a wide range of 3ware/LSI RAID cards.
[dave@rasputin:~]$ /usr/local/bin/nagios_3ware_raid_check -v Card 6 is a 8006-2LP Unit u0 on card6 is a RAID-1 array of 931 GB and is OK RAIDCHECK OK - Card 6 unit u0 RAID-1 OK (931GB)
When actually using it from Nagios, don’t use the -v (verbose) option – just use something like the following in nrpe_local.cfg:
# Monitor RAID status command[check_raid]=/usr/local/bin/nagios_3ware_raid_check