diff options
Diffstat (limited to 'database/sqlite/sqlite_health.h')
-rw-r--r-- | database/sqlite/sqlite_health.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/database/sqlite/sqlite_health.h b/database/sqlite/sqlite_health.h index 96d090b54..55e523d2f 100644 --- a/database/sqlite/sqlite_health.h +++ b/database/sqlite/sqlite_health.h @@ -5,9 +5,10 @@ #include "../../daemon/common.h" #include "sqlite3.h" +struct sql_alert_transition_data; +struct sql_alert_config_data; extern sqlite3 *db_meta; void sql_health_alarm_log_load(RRDHOST *host); -int sql_create_health_log_table(RRDHOST *host); void sql_health_alarm_log_update(RRDHOST *host, ALARM_ENTRY *ae); void sql_health_alarm_log_insert(RRDHOST *host, ALARM_ENTRY *ae); void sql_health_alarm_log_save(RRDHOST *host, ALARM_ENTRY *ae); @@ -16,4 +17,24 @@ int alert_hash_and_store_config(uuid_t hash_id, struct alert_config *cfg, int st 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, uint32_t after, 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, uuid_t *config_hash_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); #endif //NETDATA_SQLITE_HEALTH_H |