X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fchecks%2Fdsa-check-hpacucli;h=06c6fadeb7c48405a617461ad7d032b2d689f4c1;hb=923c011b2ad9c4777814d646982b150caac56d3a;hp=ac8c9b48fdcf4a239417151b4fd04a98c6197d2a;hpb=0d8ea38e4c296dd9f74e1a5d8b6405fa914fd8b2;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/checks/dsa-check-hpacucli b/dsa-nagios-checks/checks/dsa-check-hpacucli index ac8c9b4..06c6fad 100755 --- a/dsa-nagios-checks/checks/dsa-check-hpacucli +++ b/dsa-nagios-checks/checks/dsa-check-hpacucli @@ -5,7 +5,7 @@ # # does _not_ check raid status. use arrayprobe for that. -# Copyright (c) 2008 Peter Palfrader +# Copyright (c) 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 @@ -97,7 +97,7 @@ for my $slot (sort @controllers) { push @{$status{'Failed'}}, $1; } elsif (/^Error: The specified controller does not have any physical drives on it.$/) { $nodrives = 1; - } elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed|Rebuilding)(?:, spare)?\)$/) { + } elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed|Rebuilding)(?:, (?:active )?spare)?\)$/) { my $drive = $1; my $status = $2; push @{$status{$status}}, $drive; @@ -124,7 +124,7 @@ for my $slot (sort @controllers) { my $type; if ($drive =~ /^[0-9]+:[0-9]+$/) { # scsi drives $type = 'SCSI'; - } elsif ($drive =~ /^[0-9]+I:[0-9]+:[0-9]+$/) { # SAS + } elsif ($drive =~ /^[0-9]+[EI]:[0-9]+:[0-9]+$/) { # SAS $type = 'SAS'; } else { # I'm not going to run pass arguments of unknown form to the shell..