Nagios plugin to check server RAID status

Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.

Nagios plugin to check server RAID status

Postby lik » Thu Oct 25, 2012 9:20 pm

This plugin checks all RAID volumes (hardware and software) that can be identified.

Supported RAIDs that can be checked:
Adaptec AAC RAID via aaccli or afacli or arcconf
AIX software RAID via lsvg
HP/Compaq Smart Array via cciss_vol_status (hpsa supported too)
HP Smart Array Controllers and MSA Controllers via hpacucli (see hapacucli readme)
HP Smart Array (MSA1500) via serial line
Linux 3ware SATA RAID via tw_cli
Linux DPT/I2O hardware RAID controllers via /proc/scsi/dpt_i2o
Linux GDTH hardware RAID controllers via /proc/scsi/gdth
Linux LSI MegaRaid hardware RAID via CmdTool2
Linux LSI MegaRaid hardware RAID via megarc
Linux LSI MegaRaid hardware RAID via /proc/megaraid
Linux MegaIDE hardware RAID controllers via /proc/megaide
Linux MPT hardware RAID via mpt-status
Linux software RAID (md) via /proc/mdstat
LSI Logic MegaRAID SAS series via MegaCli
LSI MegaRaid via lsraid
Serveraid IPS via ipssend
Solaris software RAID via metastat

You need to install corresponding RAID management utilities on the server for the correct work with hardware RAID controllers.
Project at Nagios Exchange
Download plugin:
Code: Select all
wget -O check_raid
chmod +x check_raid

Sample plugin output:
Code: Select all
# ./check_raid
OK: tw_cli:[c0(9650SE-4LPML): u0:OK, (disks: p0:OK p1:OK p2:OK p3:OK)]

Next step is to add custom EXEC section into SNMPd configuration on the server. It will allow us to retrieve plugin output remotely via SNMP protocol.
We can add it into default configuration file (/etc/snmp/snmpd.conf) or use additional configuration file (/etc/snmp/snmpd.local.conf) which is also parsed by default:
Code: Select all
exec check_raid /scripts/check_raid

Restart SNMPd to apply configuration and query check_raid plugin remotely:
Code: Select all
# snmpwalk -c public -v2c
UCD-SNMP-MIB::extIndex.1 = INTEGER: 1
UCD-SNMP-MIB::extNames.1 = STRING: check_raid
UCD-SNMP-MIB::extCommand.1 = STRING: /scripts/check_raid
UCD-SNMP-MIB::extResult.1 = INTEGER: 0
UCD-SNMP-MIB::extOutput.1 = STRING: OK: 3ware:[c0(9650SE-4LPML): u0:OK, (disks: p0:OK p1:OK p2:OK p3:OK)]
UCD-SNMP-MIB::extErrFix.1 = INTEGER: 0
UCD-SNMP-MIB::extErrFixCmd.1 = STRING:

Finally, you can integrate it as Nagios check using convenient for you method (for example with the help of 'retrieve custom snmp' plugin).
Posts: 490
Joined: Wed Dec 15, 2010 3:21 am

Return to Monitoring


  • Related topics
    Last post