|
|
@ -38,7 +38,7 @@ GetOptions( |
|
|
|
"pwr-margin=i" => \$pwr_margin, |
|
|
|
"pwr-margin=i" => \$pwr_margin, |
|
|
|
"temp-hyst=i" => \$temp_hyst, |
|
|
|
"temp-hyst=i" => \$temp_hyst, |
|
|
|
"temp-hd-hyst=i" => \$temp_hd_hyst, |
|
|
|
"temp-hd-hyst=i" => \$temp_hd_hyst, |
|
|
|
"temp-ups-hyst=i" => \$temp_hyst_hyst, |
|
|
|
"temp-ups-hyst=i" => \$temp_ups_hyst, |
|
|
|
"pwr-hyst=i" => \$pwr_hyst |
|
|
|
"pwr-hyst=i" => \$pwr_hyst |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -260,14 +260,13 @@ if ($upsc && -x $upsc){ |
|
|
|
foreach my $l (@lines){ |
|
|
|
foreach my $l (@lines){ |
|
|
|
if ($l =~ m/^ups\.temperature:\s+(\d+(\.\d+)?)/){ |
|
|
|
if ($l =~ m/^ups\.temperature:\s+(\d+(\.\d+)?)/){ |
|
|
|
my $sensor = { |
|
|
|
my $sensor = { |
|
|
|
description => "ups temperature", |
|
|
|
description => "ups temperature", |
|
|
|
type => 'temp', |
|
|
|
type => 'temp', |
|
|
|
threshold_high => $def_temp_threshold_high, |
|
|
|
threshold_high => $def_temp_thres_high, |
|
|
|
threshold_low => $def_temp_threshold_high-$temp_ups_hyst, |
|
|
|
threshold_low => $def_temp_thres_high-$temp_ups_hyst, |
|
|
|
unit => '°C', |
|
|
|
unit => '°C', |
|
|
|
cmd => "$upsc $ups ups.temperature" |
|
|
|
cmd => "$upsc $ups ups.temperature" |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|