diff options
Diffstat (limited to '')
-rw-r--r-- | src/exporting/init_connectors.c (renamed from exporting/init_connectors.c) | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/exporting/init_connectors.c b/src/exporting/init_connectors.c index 5167a68c2..3481ded4f 100644 --- a/exporting/init_connectors.c +++ b/src/exporting/init_connectors.c @@ -5,7 +5,7 @@ #include "json/json.h" #include "opentsdb/opentsdb.h" -#if ENABLE_PROMETHEUS_REMOTE_WRITE +#ifdef ENABLE_PROMETHEUS_REMOTE_WRITE #include "prometheus/remote_write/remote_write.h" #endif @@ -13,11 +13,11 @@ #include "aws_kinesis/aws_kinesis.h" #endif -#if ENABLE_EXPORTING_PUBSUB +#ifdef ENABLE_EXPORTING_PUBSUB #include "pubsub/pubsub.h" #endif -#if HAVE_MONGOC +#ifdef HAVE_MONGOC #include "mongodb/mongodb.h" #endif @@ -61,7 +61,7 @@ int init_connectors(struct engine *engine) return 1; break; case EXPORTING_CONNECTOR_TYPE_PROMETHEUS_REMOTE_WRITE: -#if ENABLE_PROMETHEUS_REMOTE_WRITE +#ifdef ENABLE_PROMETHEUS_REMOTE_WRITE if (init_prometheus_remote_write_instance(instance) != 0) return 1; #endif @@ -79,7 +79,7 @@ int init_connectors(struct engine *engine) #endif break; case EXPORTING_CONNECTOR_TYPE_MONGODB: -#if HAVE_MONGOC +#ifdef HAVE_MONGOC if (init_mongodb_instance(instance) != 0) return 1; #endif @@ -95,11 +95,9 @@ int init_connectors(struct engine *engine) netdata_log_error("EXPORTING: cannot create thread worker. uv_thread_create(): %s", uv_strerror(error)); return 1; } - 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); + analytics_statistic_t statistic = { "EXPORTING_START", "OK", instance->config.type_name }; + analytics_statistic_send(&statistic); } return 0; |