check_megaraid_sas

Bookmark and Share

Rating
14 votes
Favoured:
6
Current Version
12
Last Release Date
2010-10-18
Compatible With
  • Nagios 2.x
  • Nagios 3.x
Owner
License
GPL
Hits
65831
Files:
FileDescription
check_megaraid_sascheck_megaraid_sas plugin (rev. 12)
A plugin to check the health and status of disk and logical drives attached to LSI megaraid SAS controllers.
This plugin calls LSI's MegaCli utility to determine the health of disks and logical drive units attached to Megraid SAS controllers. It has been tested by the author on Dell PERC 5 & 6 controllers, but should work well with any controller supported by the MegaCli tool.
Reviews (9)
bysilfreed, April 14, 2011
5 of 5 people found this review helpful
This is a great tool; we recently added a patch to support BBU checks (-b flag) and output a warning for consistency checks.

http://pastebin.com/udTLmBiU
byalfred, September 14, 2010
1 of 1 people found this review helpful
hello,
works perfect on dell r310 with H700a

lspci:
05:00.0 RAID bus controller: LSI Logic / Symbios Logic LSI MegaSAS 9260 (rev 04)

thank you
alfred
byairo, April 14, 2013
for work in nagios 3 add in first 10 line

"# nagios: -epn"

for disable embedded Perl interprete
bymudricd, April 2, 2013
Any idea how to configure it with windows server? I have lsi mega raid and lsi sas2 2008 falcon controllers on win servers...
On line 144 change:
if ( m/Sizes*:s*((d+.?d*)s*(MB|GB|TB))/ ) {
to
if ( m/^Sizes*:s*((d+.?d*)s*(MB|GB|TB))/ ) {
or else it will report the "Parity Size" as the size of that logical device.
Thanks for this very useful tools. It works the treat on our SUN and IBM servers.

However there is a bug preventing the accurate report of array size when the strip size is reported in MB. however fixing it is simple:

on line 144 replace
if ( m/Sizes*:s*((d+.?d*)s*(MB|GB|TB))/ ) {

with
if ( m/^Sizes*:s*((d+.?d*)s*(MB|GB|TB))/ ) {
byzhang, May 13, 2012
for example: it is a bug
server: 192.168.2.101
[root@tcode-db2 MegaCli]#/usr/local/nagios/libexec/check_megaraid_sas
OK: 0:0:RAID-10:4 drives:557.75GB:Optimal Drives:4
#########################
when i run it on the nagios server:
server:192.168.2.117
[root@mail libexec]# ./check_nrpe -H 192.168.2.101 -c check_megaraid_sas
OK: Drives:0
why Drives:0 ???
how to solve it? it is write by perl!!!
bykride, April 2, 2012
guyrush... can you paste again the bugfix? It is incomplete.

"if ( $pdcount .......................".

thank you
byguybrush, November 10, 2010
I like your plugin, but found a bug: If the script fails for any reason it just reports:

OK: Drives 0

This is actually misleading, because it does not check the Drives at all.

I wrote a bugfix for that:

just BEFORE the last line (exitreport($status, $result);)
add:
if ( $pdcount