diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2021-01-19 17:02:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-19 17:02:34 +0200 |
commit | 83c0662ad5e7d8b2e998308ef542a0f85beba289 (patch) | |
tree | 1267406f74c8fbfdbb9352dad589258fa75b97f7 /health/health_log.c | |
parent | 4ac52b168df03417ad1f7ce0bc54dd5888a3f921 (diff) |
Reduce the number of alarm updates on ACLK #10524
Notify only if alarm status is critical or warning (old or new) (#10524)
Diffstat (limited to 'health/health_log.c')
-rw-r--r-- | health/health_log.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/health/health_log.c b/health/health_log.c index 0ee13b13c3..8c0bc5c34f 100644 --- a/health/health_log.c +++ b/health/health_log.c @@ -153,8 +153,12 @@ inline void health_alarm_log_save(RRDHOST *host, ALARM_ENTRY *ae) { } } #ifdef ENABLE_ACLK - if (netdata_cloud_setting) - aclk_update_alarm(host, ae); + if (netdata_cloud_setting) { + if ((ae->new_status == RRDCALC_STATUS_WARNING || ae->new_status == RRDCALC_STATUS_CRITICAL) || + ((ae->old_status == RRDCALC_STATUS_WARNING || ae->old_status == RRDCALC_STATUS_CRITICAL))) { + aclk_update_alarm(host, ae); + } + } #endif } |