skip absent temperature readings
authorStephen Gran <steve@lobefin.net>
Tue, 1 Dec 2009 03:46:59 +0000 (03:46 +0000)
committerStephen Gran <steve@lobefin.net>
Tue, 1 Dec 2009 03:46:59 +0000 (03:46 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
dsa-nagios-checks/checks/dsa-check-hpasm

index 1f6550c..63505f3 100755 (executable)
@@ -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) {