diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-05-22 22:24:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 22:24:40 +0300 |
commit | 30ce1c2497f7c8db247c7a3d5b28928d8dd3d1e2 (patch) | |
tree | 6e1e04ef9ebca1028657709ffbe2d45efd5443b4 /exporting | |
parent | 8366f6b0bbab1da7a0f3dcb0e9162ad01818b5d5 (diff) |
Send anonymous statistics from backends and exporting engine (#9125)
Diffstat (limited to 'exporting')
-rw-r--r-- | exporting/exporting_engine.c | 1 | ||||
-rw-r--r-- | exporting/exporting_engine.h | 1 | ||||
-rw-r--r-- | exporting/init_connectors.c | 2 | ||||
-rw-r--r-- | exporting/read_config.c | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/exporting/exporting_engine.c b/exporting/exporting_engine.c index 17f2327c4d..e8dd8d64ea 100644 --- a/exporting/exporting_engine.c +++ b/exporting/exporting_engine.c @@ -84,6 +84,7 @@ void *exporting_main(void *ptr) if (init_connectors(engine) != 0) { error("EXPORTING: cannot initialize exporting connectors"); + send_statistics("EXPORTING_START", "FAIL", "-"); goto cleanup; } diff --git a/exporting/exporting_engine.h b/exporting/exporting_engine.h index e567676fec..9869cd7e20 100644 --- a/exporting/exporting_engine.h +++ b/exporting/exporting_engine.h @@ -59,6 +59,7 @@ struct engine; struct instance_config { EXPORTING_CONNECTOR_TYPE type; + const char *type_name; const char *name; const char *destination; diff --git a/exporting/init_connectors.c b/exporting/init_connectors.c index 53c89e68bc..4a68118970 100644 --- a/exporting/init_connectors.c +++ b/exporting/init_connectors.c @@ -90,6 +90,8 @@ int init_connectors(struct engine *engine) char threadname[NETDATA_THREAD_NAME_MAX + 1]; snprintfz(threadname, NETDATA_THREAD_NAME_MAX, "EXPORTING-%zu", instance->index); uv_thread_set_name_np(instance->thread, threadname); + + send_statistics("EXPORTING_START", "OK", instance->config.type_name); } return 0; diff --git a/exporting/read_config.c b/exporting/read_config.c index 3602cc57f4..f4dd06d4cd 100644 --- a/exporting/read_config.c +++ b/exporting/read_config.c @@ -336,6 +336,7 @@ struct engine *read_exporting_config() instance_name = tmp_ci_list->local_ci.instance_name; + tmp_instance->config.type_name = strdupz(tmp_ci_list->local_ci.connector_name); tmp_instance->config.name = strdupz(tmp_ci_list->local_ci.instance_name); |