This will perform health checks on a MegaRAID device using the proper binary for your platform.
Debian information on the binaries are here: http://hwraid.le-vert.net/wiki/DebianPackages (Note that the megaclisas-status linked here is the original un-maintaned version and not this fork).
MegaCLI previously offered by LSI is now maintained by Broadcom, a package with combined binaries for all operating systems can be found here: https://www.broadcom.com/support/download-search/?dk=megacli
Note that the MegaCLI package is only available as an RPM so you will need to use alien or equivalent to convert to your distributions preferred packaging format.
megaclisas-status [--nagios | --snmp | -q]
- no parameters: show megaraid info
- --nagios: show nagios-friendly output
- --snmp: show snmp MIB friendly output
- -q: Quiet mode, only displays output if an array or disk is bad - intended for use from cron.
Populate a cron job as follows to check any found array at 1AM every morning, this will only raise output if issues are found:
# /etc/cron.d/megaclisas-status
# Check raid status
0 1 * * * root /usr/local/sbin/megaclisas-status -q
You can find a plugin, with instructions, here: http://exchange.nagios.org/directory/Plugins/System-Metrics/Storage-Subsystem/Raid-Check-using-megaclisas/details
- Install the MegaCLI Package for your platform
- Copy this script to /usr/local/sbin and make it executable
- Add the following to snmp.conf: extend megaraid /usr/local/sbin/megaclisas-status --snmp
- Restart snmpd
The output MIB will be .1.3.6.1.4.1.8072.1.3.2.4.1.2.8.109.101.103.97.114.97.105.100
and the outputs are:
- .1 megaraid = 0, no megaraid = 1
- .2 Healthy = 0, Unhealthy = 1
- .3 number of good arrays
- .4 number of bad arrays
- .5 number of good disks
- .6 number of bad disks