Package: nagios-plugins-contrib
Version: 4.20120702
Severity: normal
Tags: patch

Running check_raid on a system with a 3ware controller (here 9500S-4LP)
may result into reporting "CRITICAL" while tw_cli says all logical
devices are fine:

# /usr/lib/nagios/plugins/check_raid
CRITICAL: 3ware:[c0(9500S-4LP): u0:OK, (disks: p0:OK p1:OK p2:OK
p3:NOT-PRESENT)]
# tw_cli /c0 show

Unit  UnitType  Status         %RCmpl  %V/I/M  Stripe  Size(GB)  Cache
AVrfy
------------------------------------------------------------------------------
u0    RAID-5    OK             -       -       64K     465.641   OFF
OFF

Port   Status           Unit   Size        Blocks        Serial
---------------------------------------------------------------
p0     OK               u0     298.09 GB   625142448     WD-WCAT15828440

p1     OK               u0     233.76 GB   490234752     WD-WMANK1948500

p2     OK               u0     233.76 GB   490234752     WD-WCANK3813556

p3     NOT-PRESENT      -      -           -             -

Looking into latest upstream, which has major improvements for
check_raids, there is a fix included.

Applying the attached patch fixes the issue.

Cheers and thanks, Jan.
-- 
Never write mail to <w...@spamfalle.info>, you have been warned!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS
PE Y++
PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++
------END GEEK CODE BLOCK------
--- check_raid.orig	2012-07-02 19:53:00.000000000 +0200
+++ check_raid	2012-11-07 19:47:09.000000000 +0100
@@ -761,7 +761,7 @@
 			next unless (my($p, $s,) = /^(p\d+)\s+(\S+)\s+.+\s+.+\s+.+/);
 			push(@ds, "$p:$s");
 			foreach (@ds) {
-				$status = $ERRORS{CRITICAL} unless (/p\d+:OK/);
+				$status = $ERRORS{CRITICAL} unless (/p\d+:(OK|NOT-PRESENT)/);
 			}
 		}
 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to