Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_megaraid_sas v2

Rating
5 votes
Favoured:
1
Current Version
1.0.7
Last Release Date
2015-05-20
Compatible With
  • Nagios 2.x
  • Nagios 3.x
Owner
Hits
16611
Files:
FileDescription
check_megaraid_sascheck_megaraid_sas
Nagios CSP

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!
Check a megaraid array's logical disks, physical disks, and batteries/BBUs. Uses MegaCli. This is a fork of check_megaraid_sas.
Check a megaraid array's logical disks, physical disks, and batteries/BBUs. Uses MegaCli.

This is a fork of check_megaraid_sas, which seems to be unmaintained. Incorporates some fixes and patches on the check_megaraid_sas page. Adds some new options features, and fixes, such as checking cache policy (-c), ignoring consistency checks (--consistency_check_is_ok), ignoring missing MegaCli (--missing_is_ok), ignoring lack of a battery (--no_battery_is_ok), and sudo (--sudo).
Reviews (4)
How do you apply "b.laessig" fix? Or can someone send me the fix to richard.maison@outlook.com?
byb.laessig, May 25, 2016
1 of 1 people found this review helpful
When having Logical Drive 0,1,3 instead of 0,1,2 the plugin throws perl errors. This patch fixes this:

diff --git a/check_megaraid_sas b/check_megaraid_sas
index b9c2a32..b2bc32b 100644
--- a/check_megaraid_sas
+++ b/check_megaraid_sas
@@ -219,8 +219,20 @@ ADAPTER: for ( my $adp = 0; $adp while () {
+ if ( m/^Virtual Drive:.\d..Target Id: (\d+)./i ) {
+ push(@ldlist, $1);
+ }
+ }
+ close LDGETLIST;
+

- LDISK: for ( my $ld = 0; $ld apostopt |")
|| exitreport('UNKNOWN', "error: Could not execute $megacli -LdInfo -L$ld -a$adp $megapostopt ");
--
2.1.4
byiqtc, January 13, 2016
1 of 1 people found this review helpful
Tested and works correctly. Thanks!

Just one thing for people testing it, if it appears the following message in your nagios:
OK: Drives:0

Just check two things:
1. In /etc/sudoers you have this line:
nagios ALL=NOPASSWD:/usr/sbin/megacli

2. You are executing this script with the --sudo option.
Your nrpe config file ( /usr/local/nagios/libexec/nrpe.c ) should has something like:
command[check_megaraid_sas]=/usr/local/nagios/libexec/check_megaraid_sas --sudo
I've been using the check_megaraid_sas plugin for years, and just recently started using this much improved version. However, along with being able to ignore charging status, it would also be nice to be able to ignore BBU "Learning" as well. I hacked this into my own copy, but didn't think it merited a separate version on the exchange. I can PM it to you if you'd like to incorporate the change into this supported version.