packages: nagios-plugin-check_raid/check_raid, nagios-plugin-check_raid/t/i...

glen glen at pld-linux.org
Fri Jan 21 16:55:42 CET 2011


Author: glen                         Date: Fri Jan 21 15:55:42 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
contributed patch:
Hello,
I have attached a patch for check_raid.
The patch contains small changes to the check_ipssend() function and a sample output of ipssend.
The patch was tested on two IBM xSeries 346 servers with Adaptec ServeRAID 7k controllers. The ipssend version is v7.12.14.
Best regards and thank you for the wonderful work,
-- 
George Negoita
System Administrator
ngmlabs.com

---- Files affected:
packages/nagios-plugin-check_raid:
   check_raid (1.89 -> 1.90) 
packages/nagios-plugin-check_raid/t:
   ipssend (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.89 packages/nagios-plugin-check_raid/check_raid:1.90
--- packages/nagios-plugin-check_raid/check_raid:1.89	Mon Jan 10 18:24:58 2011
+++ packages/nagios-plugin-check_raid/check_raid	Fri Jan 21 16:55:37 2011
@@ -337,9 +337,13 @@
 	my @CMD = $ipssend;
 	unshift(@CMD, $sudo) if $> and $sudo;
 
-	open(my $fh , '-|', @CMD) or return;
+	my $n;
+	open(my $fh , '-|', @CMD, 'GETCONFIG', '1', 'LD') or return;
 	while (<$fh>) {
-		next if (my($n) = /drive number (\d+)/i);
+		if (/drive number (\d+)/i){
+		    $n=$1;
+		    next;
+		}
 		next unless valid($n);
 		next unless (my($s, $c) = /Status .*: (\S+)\s+(\S+)/);
 

================================================================
Index: packages/nagios-plugin-check_raid/t/ipssend
diff -u /dev/null packages/nagios-plugin-check_raid/t/ipssend:1.1
--- /dev/null	Fri Jan 21 16:55:42 2011
+++ packages/nagios-plugin-check_raid/t/ipssend	Fri Jan 21 16:55:37 2011
@@ -0,0 +1,30 @@
+Found 1 IBM ServeRAID controller(s).
+Read configuration has been initiated for controller 1...
+----------------------------------------------------------------------
+Logical drive information
+----------------------------------------------------------------------
+ Logical drive number 1
+   Status of logical drive        : Okay (OKY)
+   RAID level                     : 1
+   Size (in MB)                   : 34715
+   Write cache status             : Write back (WB)
+   Number of chunks               : 2
+   Stripe-unit size               : 8 KB
+   Access blocked                 : No
+   Part of array                  : A
+   Part of merge group            : 207
+ Logical drive number 2
+   Status of logical drive        : Critical (CRT)
+   RAID level                     : 5
+   Size (in MB)                   : 210018
+   Write cache status             : Write back (WB)
+   Number of chunks               : 4
+   Stripe-unit size               : 8 KB
+   Access blocked                 : No
+   Part of array                  : B
+   Part of merge group            : 207
+
+   Array A stripe order (Channel/SCSI ID)  : 1,0 1,1
+   Array B stripe order (Channel/SCSI ID)  : 1,2 1,3 1,4 1,5
+
+Command completed successfully.
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_raid/check_raid?r1=1.89&r2=1.90&f=u



More information about the pld-cvs-commit mailing list