dsa-check-raid-3ware: Learn about REBUILDING state for 3ware raid units
authorPeter Palfrader <peter@palfrader.org>
Thu, 20 Aug 2009 11:50:07 +0000 (13:50 +0200)
committerPeter Palfrader <peter@palfrader.org>
Thu, 20 Aug 2009 11:50:07 +0000 (13:50 +0200)
dsa-nagios-checks/checks/dsa-check-raid-3ware
dsa-nagios-checks/debian/changelog

index a9887b9..ccecf30 100755 (executable)
@@ -1,6 +1,26 @@
 #!/usr/bin/perl -Tw
 
-# Copyright (C) 2006 Peter Palfrader <peter@palfrader.org>
+# Copyright (C) 2006,2008,2009 Peter Palfrader <peter@palfrader.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
 
 # Need to allow /usr/local/bin/tw_cli info c0 u0 status in sudoers:
 #
@@ -15,7 +35,7 @@ $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin';
 delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
 
 my $TW_CLI = '/usr/local/bin/tw_cli';
-my $SVN_REVISION_STRING = '$Rev: 313 $';
+my $SVN_REVISION_STRING = '$Rev: 410 $';
 my ($SVN_REVISION) = ($SVN_REVISION_STRING =~ /([0-9]+)/);
     $SVN_REVISION  = 'unknown' unless defined $SVN_REVISION;
 my $VERSION = '0.0.0.'.$SVN_REVISION;
@@ -90,6 +110,9 @@ for my $line (@tw)  {
            $status eq 'VERIFYING') {
                $msg .= ($msg eq '' ? '' : '; '). "$device: $status";
                $exit = $exit > $OK ? $exit : $OK;
+       } elsif ($status eq 'REBUILDING') {
+               $msg .= ($msg eq '' ? '' : '; '). "$device: $status";
+               $exit = $exit > $WARNING ? $exit : $WARNING;
        } elsif ($status eq 'DEGRADED') {
                $msg .= ($msg eq '' ? '' : '; '). "$device: $status";
                $exit = $exit > $CRITICAL ? $exit : $CRITICAL;
index ff4fe53..f07c7b2 100644 (file)
@@ -1,3 +1,9 @@
+dsa-nagios-checks (82) stable; urgency=low
+
+  * dsa-check-raid-3ware: Learn about REBUILDING state for 3ware raid units.
+
+ -- Peter Palfrader <weasel@debian.org>  Thu, 20 Aug 2009 13:48:43 +0200
+
 dsa-nagios-checks (81) stable; urgency=low
 
   * dsa-check-raid-mpt: mpt-status returns non-zero exit code when