fix(charts.d.plugin): fix recursion in apcupsd_check and enable it again (#12418)
Ilya Mashchenko committed
Mar 15, 2022 at 22:39 UTC
0c9f02b539b9e8e88f447380477643e79e725166
2 files changed
+1
-6
collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh
+1
-1
@@ -50,7 +50,7 @@ apcupsd_check() {
50
51
local host working=0 failed=0
52
for host in "${!apcupsd_sources[@]}"; do
53
- run apcupsd_get "${apcupsd_sources[${host}]}" > /dev/null
53
+ apcupsd_get "${apcupsd_sources[${host}]}" > /dev/null
54
# shellcheck disable=2181
55
if [ $? -ne 0 ]; then
56
error "cannot get information for apcupsd server ${host} on ${apcupsd_sources[${host}]}."
collectors/charts.d.plugin/charts.d.plugin.in
-5
@@ -418,11 +418,6 @@ all_enabled_charts() {
418
# find all enabled charts
419
for chart in $(all_charts); do
420
MODULE_NAME="${chart}"
421
-
422
- if [ "$MODULE_NAME" == "apcupsd" ] && [ -n "$NETDATA_LISTENER_PORT" ]; then
423
- info "apcupsd is temporarily disabled because of bug #12413"
424
- continue
425
- fi
421
422
if [ -n "${obsolete_charts["$MODULE_NAME"]}" ]; then
423
debug "is replaced by ${obsolete_charts["$MODULE_NAME"]}, skipping it."