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

glen glen at pld-linux.org
Mon Apr 18 09:54:17 CEST 2011


Author: glen                         Date: Mon Apr 18 07:54:17 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
contributed patch by Anders Qvist <quest#lysator.liu.se>:
In order to get check_raid to work correctly with my afacli, I had to
patch 2.1 as follows:
--- remote-checks/check_raid    2011-04-15 14:01:46.000000000 +0200
+++ check_raid  2011-04-15 14:01:33.000000000 +0200
@@ -414,7 +414,7 @@
        close $write;
        while (<$read>) {
-               if (my($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\S+\s+(\S+)/) {
+               if (my($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\s?\S+\s+(\S+)/) {
                        next unless valid($dsk);
                        $dsk =~ s/:/\//g;
                        next unless valid($dsk);
Don't know if previous users all had > 1TB disk or if there is a
difference in version afacli behaviour with my oldish CERC. My output
looks like this:
AFA0> container list /full
Executing: container list /full=TRUE
Num          Total  Oth Chunk          Scsi   Partition                                      Creation        System
Label Type   Size   Ctr Size   Usage   B:ID:L Offset:Size   State   RO Lk Task    Done%  Ent Date   Time      Files
----- ------ ------ --- ------ ------- ------ ------------- ------- -- -- ------- ------ --- ------ -------- ------
 0    Mirror  465GB            Valid   0:00:0 64.0KB: 465GB Normal                        0  032511 17:55:06
 /dev/sda             root             0:01:0 64.0KB: 465GB Normal                        1  032511 17:55:06
Otherwise, excellent work, thanks!

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

---- Diffs:

================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.90 packages/nagios-plugin-check_raid/check_raid:1.91
--- packages/nagios-plugin-check_raid/check_raid:1.90	Fri Jan 21 16:55:37 2011
+++ packages/nagios-plugin-check_raid/check_raid	Mon Apr 18 09:54:12 2011
@@ -423,7 +423,9 @@
 	close $write;
 
 	while (<$read>) {
-		if (my($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\S+\s+(\S+)/) {
+ 		# 0    Mirror  465GB            Valid   0:00:0 64.0KB: 465GB Normal                        0  032511 17:55:06
+ 		# /dev/sda             root             0:01:0 64.0KB: 465GB Normal                        1  032511 17:55:06
+        if (my($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\s?\S+\s+(\S+)/) {
 			next unless valid($dsk);
 			$dsk =~ s/:/\//g;
 			next unless valid($dsk);

================================================================
Index: packages/nagios-plugin-check_raid/t/afacli
diff -u /dev/null packages/nagios-plugin-check_raid/t/afacli:1.1
--- /dev/null	Mon Apr 18 09:54:17 2011
+++ packages/nagios-plugin-check_raid/t/afacli	Mon Apr 18 09:54:12 2011
@@ -0,0 +1,7 @@
+AFA0> container list /full
+Executing: container list /full=TRUE
+Num          Total  Oth Chunk          Scsi   Partition                                      Creation        System
+Label Type   Size   Ctr Size   Usage   B:ID:L Offset:Size   State   RO Lk Task    Done%  Ent Date   Time      Files
+----- ------ ------ --- ------ ------- ------ ------------- ------- -- -- ------- ------ --- ------ -------- ------
+ 0    Mirror  465GB            Valid   0:00:0 64.0KB: 465GB Normal                        0  032511 17:55:06
+ /dev/sda             root             0:01:0 64.0KB: 465GB Normal                        1  032511 17:55:06
================================================================

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



More information about the pld-cvs-commit mailing list