@cryptotaxi247 / netdata-1 / commits / f51f457c4

Improve handling of an alert that transitions to the REMOVED state (#17621)

Stelios Fragkakis committed May 9, 2024 at 21:01 UTC f51f457c4f6b0d37dad2ac7c1066e116fdd98fe7
1 file changed +3 -1
src/database/sqlite/sqlite_aclk_alert.c
+3 -1
@@ -80,7 +80,9 @@ static bool should_send_to_cloud(RRDHOST *host, ALARM_ENTRY *ae)
80 {
81 sqlite3_stmt *res = NULL;
82
83 - if (ae->new_status == RRDCALC_STATUS_REMOVED || ae->new_status == RRDCALC_STATUS_UNINITIALIZED)
83 + if (ae->new_status == RRDCALC_STATUS_UNINITIALIZED ||
84 + (ae->new_status == RRDCALC_STATUS_REMOVED &&
85 + !(ae->old_status == RRDCALC_STATUS_WARNING || ae->old_status == RRDCALC_STATUS_CRITICAL)))
86 return 0;
87
88 if (unlikely(uuid_is_null(ae->config_hash_id) || !host->aclk_config))