summaryrefslogtreecommitdiffstats
path: root/src/database/sqlite/sqlite_aclk_alert.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-24 09:54:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-24 09:54:44 +0000
commit836b47cb7e99a977c5a23b059ca1d0b5065d310e (patch)
tree1604da8f482d02effa033c94a84be42bc0c848c3 /src/database/sqlite/sqlite_aclk_alert.h
parentReleasing debian version 1.44.3-2. (diff)
downloadnetdata-836b47cb7e99a977c5a23b059ca1d0b5065d310e.tar.xz
netdata-836b47cb7e99a977c5a23b059ca1d0b5065d310e.zip
Merging upstream version 1.46.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/database/sqlite/sqlite_aclk_alert.h')
-rw-r--r--src/database/sqlite/sqlite_aclk_alert.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/database/sqlite/sqlite_aclk_alert.h b/src/database/sqlite/sqlite_aclk_alert.h
new file mode 100644
index 000000000..cfb3468b9
--- /dev/null
+++ b/src/database/sqlite/sqlite_aclk_alert.h
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef NETDATA_SQLITE_ACLK_ALERT_H
+#define NETDATA_SQLITE_ACLK_ALERT_H
+
+extern sqlite3 *db_meta;
+
+#define SEND_REMOVED_AFTER_HEALTH_LOOPS 3
+#define SEND_CHECKPOINT_AFTER_HEALTH_LOOPS 4
+
+struct proto_alert_status {
+ int alert_updates;
+ uint64_t pending_min_sequence_id;
+ uint64_t pending_max_sequence_id;
+ uint64_t last_submitted_sequence_id;
+};
+
+void aclk_send_alarm_configuration (char *config_hash);
+void aclk_push_alert_config_event(char *node_id, char *config_hash);
+void aclk_start_alert_streaming(char *node_id, bool resets);
+void sql_queue_removed_alerts_to_aclk(RRDHOST *host);
+void sql_process_queue_removed_alerts_to_aclk(char *node_id);
+void aclk_send_alarm_checkpoint(char *node_id, char *claim_id);
+void aclk_push_alarm_checkpoint(RRDHOST *host);
+
+void aclk_push_alert_snapshot_event(char *node_id);
+void aclk_process_send_alarm_snapshot(char *node_id, char *claim_id, char *snapshot_uuid);
+int get_proto_alert_status(RRDHOST *host, struct proto_alert_status *proto_alert_status);
+void sql_queue_alarm_to_aclk(RRDHOST *host, ALARM_ENTRY *ae, bool skip_filter);
+void aclk_push_alert_events_for_all_hosts(void);
+
+#endif //NETDATA_SQLITE_ACLK_ALERT_H