@cryptotaxi247 / netdata-1 / commits / 83c0662ad

Reduce the number of alarm updates on ACLK #10524

Notify only if alarm status is critical or warning (old or new) (#10524)

Stelios Fragkakis committed Jan 19, 2021 at 17:02 UTC 83c0662ad5e7d8b2e998308ef542a0f85beba289
1 file changed +6 -2
health/health_log.c
+6 -2
@@ -153,8 +153,12 @@ inline void health_alarm_log_save(RRDHOST *host, ALARM_ENTRY *ae) {
153 }
154 }
155 #ifdef ENABLE_ACLK
156 - if (netdata_cloud_setting)
157 - aclk_update_alarm(host, ae);
156 + if (netdata_cloud_setting) {
157 + if ((ae->new_status == RRDCALC_STATUS_WARNING || ae->new_status == RRDCALC_STATUS_CRITICAL) ||
158 + ((ae->old_status == RRDCALC_STATUS_WARNING || ae->old_status == RRDCALC_STATUS_CRITICAL))) {
159 + aclk_update_alarm(host, ae);
160 + }
161 + }
162 #endif
163 }
164