Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_megaraid_sas
12
2010-10-18
- Nagios 2.x
- Nagios 3.x
GPL
134088
File | Description |
---|---|
check_megaraid_sas | check_megaraid_sas plugin (rev. 12) |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
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)
byAposwolf, September 9, 2015
To make it work on windows servers you just have to set the megaclibin variable to your megacli.exe
like
my $megaclibin = 'C:\MegaCLI\config\megacli.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!
like
my $megaclibin = 'C:\MegaCLI\config\megacli.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!
bymorty, May 21, 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
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
byinnerwiz, October 27, 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
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
byhartex, September 13, 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 (
[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 (
byhblicy, July 8, 2013
1 of 1 people found this review helpful
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.
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.
byairo, April 14, 2013
for work in nagios 3 add in first 10 line
"# nagios: -epn"
for disable embedded Perl interprete
"# 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...
byerezzarum, November 18, 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.
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.
byArTourter, May 25, 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))/ ) {
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!!!
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
"if ( $pdcount .......................".
thank you
bysilfreed, April 14, 2011
6 of 6 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
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
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
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