Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
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
Owner
Jonathan Delgado
License
GPL
Compatible With
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.
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!
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
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
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? 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.
for work in nagios 3 add in first 10 line "# nagios: -epn" for disable embedded Perl interprete
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))/ ) {
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!!!
guyrush... can you paste again the bugfix? It is incomplete. "if ( $pdcount .......................". thank you
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
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
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
You must be logged in to submit a review.
To:
From: