diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:19:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-24 09:53:24 +0000 |
commit | b5f8ee61a7f7e9bd291dd26b0585d03eb686c941 (patch) | |
tree | d4d31289c39fc00da064a825df13a0b98ce95b10 /src/database/sqlite/sqlite_health.h | |
parent | Adding upstream version 1.44.3. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.46.3.upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/database/sqlite/sqlite_health.h')
-rw-r--r-- | src/database/sqlite/sqlite_health.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/database/sqlite/sqlite_health.h b/src/database/sqlite/sqlite_health.h new file mode 100644 index 000000000..99f67a3a6 --- /dev/null +++ b/src/database/sqlite/sqlite_health.h @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef NETDATA_SQLITE_HEALTH_H +#define NETDATA_SQLITE_HEALTH_H + +#include "daemon/common.h" +#include "sqlite3.h" + +struct sql_alert_transition_data; +struct sql_alert_config_data; +struct rrd_alert_prototype; +void sql_health_alarm_log_load(RRDHOST *host); +void sql_health_alarm_log_save(RRDHOST *host, ALARM_ENTRY *ae); +void sql_health_alarm_log_cleanup(RRDHOST *host, bool claimed); +void sql_alert_store_config(struct rrd_alert_prototype *ap); +void sql_aclk_alert_clean_dead_entries(RRDHOST *host); +int sql_health_get_last_executed_event(RRDHOST *host, ALARM_ENTRY *ae, RRDCALC_STATUS *last_executed_status); +void sql_health_alarm_log2json(RRDHOST *host, BUFFER *wb, time_t after, const char *chart); +int health_migrate_old_health_log_table(char *table); +uint32_t sql_get_alarm_id(RRDHOST *host, STRING *chart, STRING *name, uint32_t *next_event_id); +void sql_alert_transitions( + DICTIONARY *nodes, + time_t after, + time_t before, + const char *context, + const char *alert_name, + const char *transition, + void (*cb)(struct sql_alert_transition_data *, void *), + void *data, + bool debug); + +int sql_get_alert_configuration( + DICTIONARY *configs, + void (*cb)(struct sql_alert_config_data *, void *), + void *data, + bool debug __maybe_unused); + +bool sql_find_alert_transition(const char *transition, void (*cb)(const char *machine_guid, const char *context, time_t alert_id, void *data), void *data); +void sql_alert_cleanup(bool cli); +#endif //NETDATA_SQLITE_HEALTH_H |