RAID Controllers

check_megaraid_sas v2

Description:

Check a megaraid array’s logical disks, physical disks, and batteries/BBUs. Uses MegaCli. This is a fork of check_megaraid_sas.

Current Version

1.0.7

Last Release Date

2015-05-20

Compatible With

  • Nagios 2.x
  • Nagios 3.x

Owner


Project Files
Project Notes
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) Add a Review
How to apply latest patch?
by HHawk, May 31, 2019

How do you apply "b.laessig" fix? Or can someone send me the fix to richard.maison@outlook.com?



Problems with deleted Logical Drives
by b.laessig, May 31, 2016

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



OK: Drives:0
by iqtc, January 31, 2016

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



Ignore BBU Learning state
by lgmills, January 31, 2016

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.



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.8 (5)
Favorites
1
Views
16,517