Run upsc commands with 2>/de/null

With default conf, it'll print "Init SSL without certificate database" which we're not interested in in this context (and would break Zabbix item)
tags/zabbix-agent-addons-0.2.132-1
Daniel Berteaud 4 years ago
parent cf1dbfbba0
commit ecb831f05a
  1. 4
      zabbix_scripts/util_generate_sensors_ini

@ -366,7 +366,7 @@ if ($upsc && -x $upsc){
threshold_high => $def_ups_temp_thres_high, threshold_high => $def_ups_temp_thres_high,
threshold_low => $def_ups_temp_thres_high-$temp_ups_hyst, threshold_low => $def_ups_temp_thres_high-$temp_ups_hyst,
unit => '°C', unit => '°C',
cmd => "$upsc $ups ups.temperature" cmd => "$upsc $ups ups.temperature 2>/dev/null"
}; };
print "Found a temperature sensor for ups $ups\n"; print "Found a temperature sensor for ups $ups\n";
last; last;
@ -378,7 +378,7 @@ if ($upsc && -x $upsc){
threshold_high => $def_pwr_rel_thres_high, threshold_high => $def_pwr_rel_thres_high,
threshold_low => $def_pwr_rel_thres_high-$pwr_rel_hyst, threshold_low => $def_pwr_rel_thres_high-$pwr_rel_hyst,
unit => '%', unit => '%',
cmd => "$upsc $ups ups.load" cmd => "$upsc $ups ups.load 2>/dev/null"
}; };
} }
} }

Loading…
Cancel
Save