From: Stephen Gran Date: Tue, 1 Dec 2009 03:46:59 +0000 (+0000) Subject: skip absent temperature readings X-Git-Url: https://wiki.adam-barratt.org.uk/gitweb/?a=commitdiff_plain;h=3ecc03749909583afb63d28a6ddffbf0117b0700;p=mirror%2Fdsa-nagios.git skip absent temperature readings Signed-off-by: Stephen Gran --- diff --git a/dsa-nagios-checks/checks/dsa-check-hpasm b/dsa-nagios-checks/checks/dsa-check-hpasm index 1f6550c..63505f3 100755 --- a/dsa-nagios-checks/checks/dsa-check-hpasm +++ b/dsa-nagios-checks/checks/dsa-check-hpasm @@ -206,7 +206,6 @@ sub do_temp { } $temp_num = $1; - $num_temp++; my @line = split /\s+/, $line; my $zone = $line[1]; @@ -215,6 +214,8 @@ sub do_temp { $current_temp =~ s/(.*)C.*/$1/; $threshold =~ s/(.*)C.*/$1/; + next if ($threshold eq '-'); + $num_temp++; my $off = $threshold - $current_temp; if ($off <= 0) {