@cryptotaxi247 / netdata-1 / commits / 00115ced3

Don't queue removed when there is a newer alert (#16157)

* dont queue removed when there is a newer * proper concat * add host_id

Emmanuel Vasilakis committed Oct 10, 2023 at 17:39 UTC 00115ced3172a8640c0dba05ec61e1028fd81361
1 file changed +1
database/sqlite/sqlite_aclk_alert.c
+1
@@ -690,6 +690,7 @@ void aclk_start_alert_streaming(char *node_id, bool resets)
690 "WHERE hl.host_id = @host_id AND hl.health_log_id = hld.health_log_id AND hld.new_status = -2 AND hld.updated_by_id = 0 " \
691 "AND hld.unique_id NOT IN (SELECT alert_unique_id FROM aclk_alert_%s) " \
692 "AND hl.config_hash_id NOT IN (select hash_id from alert_hash where warn is null and crit is null) " \
693 + "AND hl.name || hl.chart NOT IN (select name || chart from health_log where name = hl.name and chart = hl.chart and alarm_id > hl.alarm_id and host_id = hl.host_id) " \
694 "ORDER BY hld.unique_id ASC ON CONFLICT (alert_unique_id) DO NOTHING;"
695 void sql_process_queue_removed_alerts_to_aclk(char *node_id)
696 {