RAID Controllers

check_megaraid_sas

Description:

A plugin to check the health and status of disk and logical drives attached to LSI megaraid SAS controllers.

Current Version

12

Last Release Date

2010-10-18

Compatible With

  • Nagios 2.x
  • Nagios 3.x

License

GPL


Project Files
Project Notes
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 (14) Add a Review
Using via nrpe in windows
by Aposwolf, September 30, 2015

To make it work on windows servers you just have to set the megaclibin variable to your megacli.exe like my $megaclibin = 'C:MegaCLIconfigmegacli.exe'; and make it readable for perl $megaclibin =~ s#\#/#g; plus copy the utils.pm from your nagios to the perl lib on the windows server. Then it works very well! Great job!



check_megaraid_sas v2
by morty, May 31, 2015

This is a great plugin. But it needed some updates. A new version of this plugin has been posted that incorporates some new features, various patches from this page and some bugfixes. New features include options to check the cache policy, ignore consistency checks, ignore missing MegaCli, ignore lack of a battery, and use sudo. Posted here: https://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_megaraid_sas-v2/details



Running via NRPE
by innerwiz, October 31, 2013

When running via NRPE: This plugin uses sudo to load /usr/sbin/MegaCli. /etc/sudoers must be modified to allow nagios to run this command as root. AND you must comment out the "Defaults requiretty" line as follows: # Defaults requiretty nagios ALL = NOPASSWD: /usr/sbin/MegaCli



"OK: Drives:0" error
by hartex, September 30, 2013

If you got the "OK: Drives:0" on the nagios server [root@nagios ~]# /usr/lib/nagios/plugins/check_nrpe -H hostname.tld -p 5666 -c check_megaraid_sas OK: Drives:0 Try to run the command on the server oyu want to mintor, but as the nagios user: [root@server~]# su nagios -c "/usr/lib64/nagios/plugins/check_megaraid_sas" sudo: sorry, you must have a tty to run sudo Use of uninitialized value $adapters in numeric lt (



The nagios web interface display is wrong
by hblicy, July 31, 2013

The nagios web interface display is wrong? OK: Drives 0 Use the nrpe also display an error? ./check_nrpe -H 172.30.0.46 -c check_megaraid_sas OK: Drives:0 Is this how to return a responsibility? For help. Thank you very much.



not work in nagios 3
by airo, April 30, 2013

for work in nagios 3 add in first 10 line "# nagios: -epn" for disable embedded Perl interprete



win server
by mudricd, April 30, 2013

Any idea how to configure it with windows server? I have lsi mega raid and lsi sas2 2008 falcon controllers on win servers...



Parity Size reported as Size
by erezzarum, November 30, 2012

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.



bug in size reporting
by ArTourter, May 31, 2012

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))/ ) {



if it is a bug?
by zhang, May 31, 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!!!



incomplete bugfix
by kride, April 30, 2012

guyrush... can you paste again the bugfix? It is incomplete. "if ( $pdcount .......................". thank you



Great tool; patch for BBU and Consistency Check
by silfreed, April 30, 2011

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



patch
by guybrush, November 30, 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



works perfect
by alfred, September 30, 2010

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



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.4 (19)
Favorites
7
Views
134,150