summaryrefslogtreecommitdiffstats
path: root/src/database/sqlite/sqlite_metadata.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/sqlite/sqlite_metadata.h')
-rw-r--r--src/database/sqlite/sqlite_metadata.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/database/sqlite/sqlite_metadata.h b/src/database/sqlite/sqlite_metadata.h
index 9e76e2a50..a5e68eb8c 100644
--- a/src/database/sqlite/sqlite_metadata.h
+++ b/src/database/sqlite/sqlite_metadata.h
@@ -6,6 +6,11 @@
#include "sqlite3.h"
#include "sqlite_functions.h"
+typedef enum event_log_type {
+ EVENT_AGENT_START_TIME = 1,
+ EVENT_AGENT_SHUTDOWN_TIME,
+} event_log_type_t;
+
// return a node list
struct node_instance_list {
nd_uuid_t node_id;
@@ -41,7 +46,7 @@ void vacuum_database(sqlite3 *database, const char *db_alias, int threshold, int
int sql_metadata_cache_stats(int op);
int get_node_id(nd_uuid_t *host_id, nd_uuid_t *node_id);
-int update_node_id(nd_uuid_t *host_id, nd_uuid_t *node_id);
+int sql_update_node_id(nd_uuid_t *host_id, nd_uuid_t *node_id);
struct node_instance_list *get_node_list(void);
void sql_load_node_id(RRDHOST *host);
@@ -54,6 +59,10 @@ bool sql_set_host_label(nd_uuid_t *host_id, const char *label_key, const char *l
uint64_t sqlite_get_meta_space(void);
int sql_init_meta_database(db_check_action_type_t rebuild, int memory);
+void cleanup_agent_event_log(void);
+void add_agent_event(event_log_type_t event_id, int64_t value);
+usec_t get_agent_event_time_median(event_log_type_t event_id);
+
// UNIT TEST
int metadata_unittest(void);
#endif //NETDATA_SQLITE_METADATA_H