X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fchecks%2Fdsa-check-raid-aacraid;h=39d725a0dfbc92874992513a1643711a65edff46;hb=e37bf5d88bb67886f806d05e6a4b76537b8b24a9;hp=0b82c475689a2c37c9c3cd1352c6bf4161e3d78c;hpb=0c28424359fbab9c5662c9b60766c8236e2c0cc1;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/checks/dsa-check-raid-aacraid b/dsa-nagios-checks/checks/dsa-check-raid-aacraid index 0b82c47..39d725a 100755 --- a/dsa-nagios-checks/checks/dsa-check-raid-aacraid +++ b/dsa-nagios-checks/checks/dsa-check-raid-aacraid @@ -59,7 +59,7 @@ sub record($) { } # arcconf puts crap into a $PWD/UcliEvt.log file. -my $dir = tempdir( "check-aacraid-XXXXXXX", CLEANUP => 1 ); +my $dir = tempdir( "/tmp/check-aacraid-XXXXXXX", CLEANUP => 1 ); chdir ($dir) or die ("Cannot chdir $dir: $!\n"); my $ctrl = 1; @@ -121,7 +121,7 @@ while ($ctrl <= $numcontrollers) { my $status = $1; if ($status eq 'Not Installed') { next; - } elsif ($status ne 'Optimal') { + } elsif ($status ne 'Optimal' && $status ne 'ZMM Optimal') { record('WARNING'); }; push @{$status{$status}}, 'Battery'; @@ -136,5 +136,8 @@ while ($ctrl <= $numcontrollers) { $ctrl++; }; +if ( -e 'UcliEvt.log' ) { + unlink('UcliEvt.log') or die ("Cannot unlink UcliEvt.log: $!\n"); +} print "$EXITCODE: ", join(" --- ", @resultstr), "\n"; exit $CODE{$EXITCODE};