[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 01/01: check_raid: Updating to latest git master to fix several bugs

Jan Wagner waja at moszumanska.debian.org
Wed Oct 8 10:48:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.

commit 486d2f0819205a7004416221bf3949290badc8a3
Author: Jan Wagner <waja at cyconet.org>
Date:   Wed Oct 8 12:40:30 2014 +0200

    check_raid: Updating to latest git master to fix several bugs
---
 check_raid/check_raid | 16 +++++++++++-----
 check_raid/control    |  2 +-
 debian/control        |  2 +-
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/check_raid/check_raid b/check_raid/check_raid
index a6faf0a..72ed784 100644
--- a/check_raid/check_raid
+++ b/check_raid/check_raid
@@ -1173,6 +1173,7 @@ sub check {
 			my @default = grep { /WriteThrough/ } @{$vol->{default_cache}};
 			# alert if WriteThrough is configured in default
 			$this->cache_fail unless @default;
+			push(@vstatus, "WriteCache:DISABLED");
 		}
 	}
 
@@ -3272,7 +3273,7 @@ sub parse {
 		if (my($file, $board_name, $name, $sn, $bus, $port1, $port2, $status) = m{
 			^(/dev/[^:]+):\s        # File
 			\(([^)]+)\)\s           # Board Name
-			Enclosure\s(.+)\s      # Enclosure Name
+			Enclosure\s(.*?)\s      # Enclosure Name
 			\(S/N:\s(\S*)\)\s       # Enclosure SN
 			on\sBus\s(\d+),\s       # Bus Number
 			Physical\sPort\s(.)     # physical_port1
@@ -3448,7 +3449,9 @@ sub check {
 			for my $i (sort {$a cmp $b} keys %{$c->{enclosures}}) {
 				my $e = $c->{enclosures}{$i};
 
-				my $s = "$e->{name}";
+				# enclosure name may be missing, identify by connection
+				my $s = $e->{name} || "$e->{bus}-$e->{phys1}$e->{phys2}";
+				# enclosure S/N may be missing
 				$s .= "($e->{sn})" if $e->{sn};
 				$s .= ": $e->{status}";
 				if ($e->{status} !~ '^OK') {
@@ -4431,12 +4434,14 @@ sub print_usage() {
 	"    Force the use of selected plugins, comma separated",
 	" -l, --list-plugins",
 	"    Lists active plugins",
+	" --noraid=STATE",
+	"    Return STATE if no RAID controller is found. Defaults to UNKNOWN",
 	" --resync=STATE",
 	"    Return STATE if RAID is in resync state. Defaults to WARNING",
 	" --check=STATE",
 	"    Return STATE if RAID is in check state. Defaults to OK",
-	" --noraid=STATE",
-	"    Return STATE if no RAID controller is found. Defaults to UNKNOWN",
+	" --cache-fail=STATE",
+	"    Set status as STATE if Write Cache is present but disabled. Defaults to WARNING",
 	" --bbulearn=STATE",
 	"    Return STATE if Backup Battery Unit (BBU) learning cycle is in progress. Defaults to WARNING",
 	" --bbu-monitoring",
@@ -4446,7 +4451,8 @@ sub print_usage() {
 
 sub print_help() {
 	print "check_raid, v$VERSION\n";
-	print "Copyright (c) 2004-2006 Steve Shipway, Copyright (c) 2009-2014, Elan Ruusamäe <glen\@pld-linux.org>
+	print "Copyright (c) 2004-2006 Steve Shipway,
+Copyright (c) 2009-2014, Elan Ruusamäe <glen\@pld-linux.org>
 
 This plugin reports the current server's RAID status
 https://github.com/glensc/nagios-plugin-check_raid
diff --git a/check_raid/control b/check_raid/control
index 711ff44..884ea14 100644
--- a/check_raid/control
+++ b/check_raid/control
@@ -1,7 +1,7 @@
 Homepage: https://github.com/glensc/nagios-plugin-check_raid
 Watch: https://github.com/glensc/nagios-plugin-check_raid "/glensc/nagios-plugin-check_raid/tree/([0-9.]+)"
 Suggests: cciss-vol-status (>= 1.10), mpt-status
-Version: 3.2.1
+Version: 3.2.1+e89c93fe8f
 Uploaders: Bernd Zeimetz <bzed at debian.org>
 Description: plugin to check sw/hw RAID status
  The plugin looks for any known types of RAID configurations,
diff --git a/debian/control b/debian/control
index c93850b..9426a92 100644
--- a/debian/control
+++ b/debian/control
@@ -106,7 +106,7 @@ Description: Plugins for nagios compatible monitoring systems
    * check_printer: plugin to check printer supply levels using SNMP
      It outputs performance data for all supplies
      found, for example toner and drum.
-   * check_raid (3.2.1): plugin to check sw/hw RAID status
+   * check_raid (3.2.1+e89c93fe8f): plugin to check sw/hw RAID status
      The plugin looks for any known types of RAID configurations,
      and checks them all.
      .

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git



More information about the Pkg-nagios-changes mailing list