packages: nagios-plugin-check_raid/check_raid - more scope fixes
glen
glen at pld-linux.org
Wed Feb 24 14:06:39 CET 2010
Author: glen Date: Wed Feb 24 13:06:39 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- more scope fixes
---- Files affected:
packages/nagios-plugin-check_raid:
check_raid (1.68 -> 1.69)
---- Diffs:
================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.68 packages/nagios-plugin-check_raid/check_raid:1.69
--- packages/nagios-plugin-check_raid/check_raid:1.68 Wed Feb 24 13:59:19 2010
+++ packages/nagios-plugin-check_raid/check_raid Wed Feb 24 14:06:34 2010
@@ -65,7 +65,7 @@
sub print_help () {
print "check_raid, v$VERSION\n";
- print "Copyright (c) 2004-2006 Steve Shipway, Copyright (c) 2009, Elan Ruusamäe <glen\@delfi.ee>
+ print "Copyright (c) 2004-2006 Steve Shipway, Copyright (c) 2009-2010, Elan Ruusamäe <glen\@delfi.ee>
This plugin reports the current server's RAID status
";
@@ -273,17 +273,18 @@
#COMMAND: logfile end
#Executing: logfile end
while (<$read>) {
- next unless (my ($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\S+\s+(\S+)/);
- next unless valid($dsk);
- $dsk =~ s/:/\//g;
- next unless valid($dsk);
- $message .= "aac:$dsk:$stat ";
- $status = $ERRORS{CRITICAL} if ($stat eq "Broken");
- $status = $ERRORS{WARNING} if (!$status and $stat eq "Rebuild");
- $status = $ERRORS{WARNING} if (!$status and $stat eq "Bld/Vfy");
- $status = $ERRORS{CRITICAL} if ($stat eq "Missing");
- $status = $ERRORS{WARNING} if (!$status and $stat eq "Verify");
- $status = $ERRORS{WARNING} if (!$status and $stat eq "VfyRepl");
+ if (my ($dsk, $stat) = /(\d:\d\d?:\d+)\s+\S+:\S+\s+(\S+)/) {
+ next unless valid($dsk);
+ $dsk =~ s/:/\//g;
+ next unless valid($dsk);
+ $message .= "aac:$dsk:$stat ";
+ $status = $ERRORS{CRITICAL} if ($stat eq "Broken");
+ $status = $ERRORS{WARNING} if (!$status and $stat eq "Rebuild");
+ $status = $ERRORS{WARNING} if (!$status and $stat eq "Bld/Vfy");
+ $status = $ERRORS{CRITICAL} if ($stat eq "Missing");
+ $status = $ERRORS{WARNING} if (!$status and $stat eq "Verify");
+ $status = $ERRORS{WARNING} if (!$status and $stat eq "VfyRepl");
+ }
}
close $read;
}
@@ -303,7 +304,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+)/) {
next unless valid($dsk);
$dsk =~ s/:/\//g;
next unless valid($dsk);
@@ -333,7 +334,7 @@
my @CMD = $mpt_status;
unshift(@CMD, $sudo) if $> and $sudo;
- open(my $fh , '-|', @CMD, '-s') or return;
+ open(my $fh, '-|', @CMD, '-s') or return;
while (<$fh>) {
if (my($d, $s) = /^log_id\s*(\d+)\s+(\S+)/) {
next unless valid($d);
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_raid/check_raid?r1=1.68&r2=1.69&f=u
More information about the pld-cvs-commit
mailing list