Fix threshold detection for power sensors

tags/zabbix-agent-addons-0.2.20-1
Daniel Berteaud 10 years ago
parent 4094dfc530
commit 113f72fb3a
  1. 4
      zabbix_scripts/util_generate_sensors_ini

@ -173,10 +173,10 @@ if (-x $ipmitool){
next SENSOR; 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; $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; $sensor->{threshold_high} = $1-$pwr_margin;
} }
} }

Loading…
Cancel
Save