packages: nagios-plugin-check_raid/check_raid - always set CRITIAL error co...
glen
glen at pld-linux.org
Wed Feb 24 14:21:10 CET 2010
Author: glen Date: Wed Feb 24 13:21:10 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- always set CRITIAL error code, WARNING and UNKNOWN if no other status is set yet
---- Files affected:
packages/nagios-plugin-check_raid:
check_raid (1.69 -> 1.70)
---- Diffs:
================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.69 packages/nagios-plugin-check_raid/check_raid:1.70
--- packages/nagios-plugin-check_raid/check_raid:1.69 Wed Feb 24 14:06:34 2010
+++ packages/nagios-plugin-check_raid/check_raid Wed Feb 24 14:21:04 2010
@@ -100,7 +100,7 @@
} elsif ($s =~ /Resync/i) {
$status = $ERRORS{WARNING} unless $status;
} else {
- $status = $ERRORS{ERROR};
+ $status = $ERRORS{CRITICAL};
}
$message .= "$d:$sd:$s ";
}
@@ -339,11 +339,11 @@
if (my($d, $s) = /^log_id\s*(\d+)\s+(\S+)/) {
next unless valid($d);
if (!$status and $s =~ /INITIAL|INACTIVE|RESYNC/) {
- $status = $ERRORS{WARNING};
+ $status = $ERRORS{WARNING} unless $status;
} elsif ($s =~ /DEGRADED/) {
$status = $ERRORS{CRITICAL};
} elsif (!$status and $s !~ /ONLINE|OPTIMAL/) {
- $status = $ERRORS{UNKNOWN};
+ $status = $ERRORS{UNKNOWN} unless $status;
}
push(@status, "Logical Volume $d:$s");
next;
@@ -419,7 +419,7 @@
# Match items from Logical Drivers
if (my($num, $s) = m/^\s+Number:\s+(\d+)\s+Status:\s+(\S+)/) {
if ($s ne "ok") {
- $status = $ERRORS{CRITICAL} unless $status;
+ $status = $ERRORS{CRITICAL};
}
push(@ld, "$controller,$num:$s");
}
@@ -440,7 +440,7 @@
while (<$fh>) {
if (my ($c, $t, $l, $s) = m/TID=\d+,\s+\(Channel=(\d+),\s+Target=(\d+),\s+Lun=(\d+)\)\s+\((\S+)\)/) {
if ($s ne "online") {
- $status = $ERRORS{CRITICAL} unless $status;
+ $status = $ERRORS{CRITICAL};
}
push(@status, "$c,$t,$l:$s");
}
@@ -509,7 +509,7 @@
$status = $ERRORS{CRITICAL};
} else {
push(@cstatus, "$u:$_");
- $status = $ERRORS{UNKNOWN};
+ $status = $ERRORS{UNKNOWN} unless $status;
}
}
push(@status, "$c($model): ". join(',', @cstatus));
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_raid/check_raid?r1=1.69&r2=1.70&f=u
More information about the pld-cvs-commit
mailing list