From: Peter Palfrader Date: Thu, 20 Aug 2009 11:50:07 +0000 (+0200) Subject: dsa-check-raid-3ware: Learn about REBUILDING state for 3ware raid units X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=17af58c593fb12396177d21c67c7eee71db34d73;p=mirror%2Fdsa-nagios.git dsa-check-raid-3ware: Learn about REBUILDING state for 3ware raid units --- diff --git a/dsa-nagios-checks/checks/dsa-check-raid-3ware b/dsa-nagios-checks/checks/dsa-check-raid-3ware index a9887b9..ccecf30 100755 --- a/dsa-nagios-checks/checks/dsa-check-raid-3ware +++ b/dsa-nagios-checks/checks/dsa-check-raid-3ware @@ -1,6 +1,26 @@ #!/usr/bin/perl -Tw -# Copyright (C) 2006 Peter Palfrader +# Copyright (C) 2006,2008,2009 Peter Palfrader +# +# 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; diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index ff4fe53..f07c7b2 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -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 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