diff options
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/analytics.c | 2 | ||||
-rw-r--r-- | daemon/global_statistics.c | 1 | ||||
-rw-r--r-- | daemon/main.c | 11 | ||||
-rw-r--r-- | daemon/static_threads.c | 10 | ||||
-rw-r--r-- | daemon/unit_test.c | 3 |
5 files changed, 25 insertions, 2 deletions
diff --git a/daemon/analytics.c b/daemon/analytics.c index 6090169446..370818b8a3 100644 --- a/daemon/analytics.c +++ b/daemon/analytics.c @@ -541,7 +541,7 @@ void analytics_gather_mutable_meta_data(void) analytics_set_data( &analytics_data.netdata_config_is_parent, (localhost->next || configured_as_parent()) ? "true" : "false"); - char *claim_id = is_agent_claimed(); + char *claim_id = get_agent_claimid(); analytics_set_data(&analytics_data.netdata_host_agent_claimed, claim_id ? "true" : "false"); freez(claim_id); diff --git a/daemon/global_statistics.c b/daemon/global_statistics.c index 8b3bfdde71..2493695191 100644 --- a/daemon/global_statistics.c +++ b/daemon/global_statistics.c @@ -996,6 +996,7 @@ static struct worker_utilization all_workers_utilization[] = { { .name = "TC", .family = "workers plugin tc", .priority = 1000000 }, { .name = "TIMEX", .family = "workers plugin timex", .priority = 1000000 }, { .name = "IDLEJITTER", .family = "workers plugin idlejitter", .priority = 1000000 }, + { .name = "RRDCONTEXT", .family = "workers aclk contexts", .priority = 1000000 }, // has to be terminated with a NULL { .name = NULL, .family = NULL } diff --git a/daemon/main.c b/daemon/main.c index ece125bcb4..f60cd34e2b 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -64,6 +64,7 @@ void netdata_cleanup_and_exit(int ret) { rrdeng_exit(multidb_ctx[tier]); #endif } + sql_close_context_database(); sql_close_database(); // unlink the pid @@ -733,6 +734,12 @@ static void get_netdata_configured_variables() { } // -------------------------------------------------------------------- + // rrdcontext + + rrdcontext_enabled = config_get_boolean(CONFIG_SECTION_CLOUD, "rrdcontexts", rrdcontext_enabled); + + + // -------------------------------------------------------------------- // get various system parameters get_system_HZ(); @@ -978,6 +985,7 @@ int main(int argc, char **argv) { // No call to load the config file on this code-path post_conf_load(&user); get_netdata_configured_variables(); + rrdcontext_enabled = CONFIG_BOOLEAN_NO; default_rrd_update_every = 1; default_rrd_memory_mode = RRD_MEMORY_MODE_RAM; default_health_enabled = 0; @@ -1010,6 +1018,9 @@ int main(int argc, char **argv) { else if(strcmp(optarg, "mctest") == 0) { return mc_unittest(); } + else if(strcmp(optarg, "ctxtest") == 0) { + return ctx_unittest(); + } else if(strcmp(optarg, "dicttest") == 0) { return dictionary_unittest(10000); } diff --git a/daemon/static_threads.c b/daemon/static_threads.c index 0ac76b9fdf..96e2799064 100644 --- a/daemon/static_threads.c +++ b/daemon/static_threads.c @@ -135,6 +135,16 @@ const struct netdata_static_thread static_threads_common[] = { }, #endif + { + .name = "rrdcontext", + .config_section = NULL, + .config_name = NULL, + .enabled = 1, + .thread = NULL, + .init_routine = NULL, + .start_routine = rrdcontext_main + }, + {NULL, NULL, NULL, 0, NULL, NULL, NULL} }; diff --git a/daemon/unit_test.c b/daemon/unit_test.c index 5eb751cd1a..8ba251b9ae 100644 --- a/daemon/unit_test.c +++ b/daemon/unit_test.c @@ -1772,6 +1772,7 @@ static RRDHOST *dbengine_rrdhost_find_or_create(char *name) , default_rrdpush_api_key , default_rrdpush_send_charts_matching , NULL + , 0 ); } @@ -2279,7 +2280,7 @@ void generate_dbengine_dataset(unsigned history_seconds) } freez(thread_info); rrd_wrlock(); - rrdhost_free(host); + rrdhost_free(host, 1); rrd_unlock(); } |