From 39038b97c71434f13ce4c57b3d5503d95c0b0166 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 21 Jul 2015 15:03:36 +0200 Subject: [PATCH] Actually create UPS sensors --- zabbix_scripts/util_generate_sensors_ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zabbix_scripts/util_generate_sensors_ini b/zabbix_scripts/util_generate_sensors_ini index b471fb2..a9e56bc 100755 --- a/zabbix_scripts/util_generate_sensors_ini +++ b/zabbix_scripts/util_generate_sensors_ini @@ -259,14 +259,15 @@ if ($upsc && -x $upsc){ next if ($? != 0); foreach my $l (@lines){ if ($l =~ m/^ups\.temperature:\s+(\d+(\.\d+)?)/){ - my $sensor = { - description => "ups temperature", + $sensors->{'ups_' . lc $ups} = { + description => "ups temperature for $ups", type => 'temp', threshold_high => $def_temp_thres_high, threshold_low => $def_temp_thres_high-$temp_ups_hyst, unit => '°C', cmd => "$upsc $ups ups.temperature" }; + print "Foudn a temperature sensor for ups $ups"; } } }