From 3ecc03749909583afb63d28a6ddffbf0117b0700 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Tue, 1 Dec 2009 03:46:59 +0000 Subject: [PATCH 1/1] skip absent temperature readings Signed-off-by: Stephen Gran --- dsa-nagios-checks/checks/dsa-check-hpasm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.20.1