[Pkg-nagios-devel] Bug#685797: nagios-plugins-contrib: check_raid - cli64 and ModelName containing spaces

Daniel Piddock dgp-deb at corefiling.co.uk
Fri Aug 24 14:47:51 UTC 2012


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

Hi,

One of our servers with an areca card has drives that have modelnames
containing spaces and hyphens. This causes the drive section of the
results from check_raid to be blank. Attached is a patch to update the
regex and handle our drives.

Regards,
Dan

-------------- next part --------------
diff -ru a/check_raid/check_raid b/check_raid/check_raid
--- a/check_raid/check_raid	2012-08-02 22:16:58.000000000 +0100
+++ b/check_raid/check_raid	2012-08-24 12:16:59.000000000 +0100
@@ -1331,7 +1331,7 @@
 		# plugin to miss a failed drive.
 		next if (/^\s+\d+\s+\d+\s+SLOT\s2[5-9]/);
 
-		next unless (my($drive1, $stat1) = /^\s+\d+\s+\d+\s+SLOT\s(\d+)\s.+\s+\d+\.\d+\w+\s\s(.+)/) || (my($drive2, $stat2) = /^\s+\d+\s+(\d+)\s+\w+\s+\d+.\d\w+\s+(.+)/);
+		next unless (my($drive1, $stat1) = /^\s+\d+\s+\d+\s+SLOT\s(\d+)\s.+\s+\d+\.\d+\w+\s\s(.+)/) || (my($drive2, $stat2) = /^\s+\d+\s+(\d+)\s+[\w-\s]+?\s+\d+.\d\w+\s+(.+)/);
 
 		if (defined($drive1)) {
 			push(@drivestatus, "$drive1:$stat1");


More information about the Pkg-nagios-devel mailing list