$num_temp++;
my $off = $threshold - $current_temp;
- if ($off <= 0) {
- $message = sprintf("TEMP zone=%s %sC/%sC ", $zone, $current_temp, $threshold);
- $exit_status |= 2;
- } elsif ($off < ($threshold/10)) {
- $message = sprintf("TEMP zone=%s %sC/%sC ", $zone, $current_temp, $threshold);
- $exit_status |= 1;
+ if ($current_temp ne '-') {
+ if ($off <= 0) {
+ $message = sprintf("TEMP zone=%s %sC/%sC ", $zone, $current_temp, $threshold);
+ $exit_status |= 2;
+ } elsif ($off < ($threshold/10)) {
+ $message = sprintf("TEMP zone=%s %sC/%sC ", $zone, $current_temp, $threshold);
+ $exit_status |= 1;
+ }
}
} elsif ($line =~ /($prompt|^\s*$)/) {
last;
+dsa-nagios-checks (85) unstable; urgency=low
+
+ * dsa-check-hpasm: Not all things where a temperature can be measured
+ might be installed (e.g. a second CPU). Don't do numeric computations
+ on a "-" instead of numbers then.
+
+ -- Peter Palfrader <weasel@debian.org> Wed, 09 Dec 2009 17:05:42 +0100
+
dsa-nagios-checks (84) unstable; urgency=low
[ Peter Palfrader ]