From 113f72fb3a39df85a5b6ed88d8f3fa1a9d6e66bc Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 9 Jul 2015 13:54:07 +0200 Subject: [PATCH] Fix threshold detection for power sensors --- zabbix_scripts/util_generate_sensors_ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zabbix_scripts/util_generate_sensors_ini b/zabbix_scripts/util_generate_sensors_ini index 4337802..d9cac0a 100755 --- a/zabbix_scripts/util_generate_sensors_ini +++ b/zabbix_scripts/util_generate_sensors_ini @@ -173,10 +173,10 @@ if (-x $ipmitool){ next SENSOR; } } - elsif ($d =~ m/^\s*Lower\scritical\s*:\s*(\d+(\.\d+))/){ + elsif ($d =~ m/^\s*Upper\scritical\s*:\s*(\d+(\.\d+))/){ $sensor->{threshold_low} = $1-$pwr_margin; } - elsif ($d =~ m/^\s*Lower\snon\-critical\s*:\s*(\d+(\.\d+))/){ + elsif ($d =~ m/^\s*Upper\snon\-critical\s*:\s*(\d+(\.\d+))/){ $sensor->{threshold_high} = $1-$pwr_margin; } }