From c5bf918c514ca01817f675a61bfe4df9339c12b9 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 21 Jul 2015 14:58:37 +0200 Subject: [PATCH] Fix stupid errors in generate_sensors_ini --- zabbix_scripts/util_generate_sensors_ini | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/zabbix_scripts/util_generate_sensors_ini b/zabbix_scripts/util_generate_sensors_ini index d71727a..b471fb2 100755 --- a/zabbix_scripts/util_generate_sensors_ini +++ b/zabbix_scripts/util_generate_sensors_ini @@ -38,7 +38,7 @@ GetOptions( "pwr-margin=i" => \$pwr_margin, "temp-hyst=i" => \$temp_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 ); @@ -260,14 +260,13 @@ if ($upsc && -x $upsc){ foreach my $l (@lines){ if ($l =~ m/^ups\.temperature:\s+(\d+(\.\d+)?)/){ my $sensor = { - description => "ups temperature", - type => 'temp', - threshold_high => $def_temp_threshold_high, - threshold_low => $def_temp_threshold_high-$temp_ups_hyst, - unit => '°C', - cmd => "$upsc $ups ups.temperature" - }; - } + description => "ups temperature", + type => 'temp', + threshold_high => $def_temp_thres_high, + threshold_low => $def_temp_thres_high-$temp_ups_hyst, + unit => '°C', + cmd => "$upsc $ups ups.temperature" + }; } } }