Skip to content

Commit ed9b12d

Browse files
authored
Fix issue netdata#11434 regarding inconsistent status check on component. (netdata#11435)
1 parent f2e95f7 commit ed9b12d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collectors/charts.d.plugin/apcupsd/apcupsd.chart.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ BEGIN {
154154
/^LOADPCT.*/ { load = \$3 * 100 };
155155
/^ITEMP.*/ { temp = \$3 * 100 };
156156
/^TIMELEFT.*/ { time = \$3 * 100 };
157-
/^STATUS.*/ { online=(\$3 == \"ONLINE\" || \$3 == \"ONBATT\")?1:0 };
157+
/^STATUS.*/ { online=(\$3 != \"COMMLOST\" && !(\$3 == \"SHUTTING\" && \$4 == \"DOWN\"))?1:0 };
158158
END {
159159
print \"BEGIN apcupsd_${host}.online $1\";
160160
print \"SET online = \" online;

0 commit comments

Comments
 (0)