summaryrefslogtreecommitdiffstats
path: root/exporting/exporting_engine.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
commit841395dd16f470e3c051a0a4fff5b91efc983c30 (patch)
tree4115f6eedcddda75067130b80acaff9e51612f49 /exporting/exporting_engine.c
parentAdding upstream version 1.30.1. (diff)
downloadnetdata-841395dd16f470e3c051a0a4fff5b91efc983c30.tar.xz
netdata-841395dd16f470e3c051a0a4fff5b91efc983c30.zip
Adding upstream version 1.31.0.upstream/1.31.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'exporting/exporting_engine.c')
-rw-r--r--exporting/exporting_engine.c60
1 files changed, 59 insertions, 1 deletions
diff --git a/exporting/exporting_engine.c b/exporting/exporting_engine.c
index 6a1320cd1..70aceea8c 100644
--- a/exporting/exporting_engine.c
+++ b/exporting/exporting_engine.c
@@ -4,12 +4,70 @@
static struct engine *engine = NULL;
+void analytics_exporting_connectors(BUFFER *b)
+{
+ if (!engine)
+ return;
+
+ uint8_t count = 0;
+
+ for (struct instance *instance = engine->instance_root; instance; instance = instance->next) {
+ if (count)
+ buffer_strcat(b, "|");
+
+ switch (instance->config.type) {
+ case EXPORTING_CONNECTOR_TYPE_GRAPHITE:
+ buffer_strcat(b, "Graphite");
+ break;
+ case EXPORTING_CONNECTOR_TYPE_GRAPHITE_HTTP:
+ buffer_strcat(b, "GraphiteHTTP");
+ break;
+ case EXPORTING_CONNECTOR_TYPE_JSON:
+ buffer_strcat(b, "JSON");
+ break;
+ case EXPORTING_CONNECTOR_TYPE_JSON_HTTP:
+ buffer_strcat(b, "JSONHTTP");
+ break;
+ case EXPORTING_CONNECTOR_TYPE_OPENTSDB:
+ buffer_strcat(b, "OpenTSDB");
+ break;
+ case EXPORTING_CONNECTOR_TYPE_OPENTSDB_HTTP:
+ buffer_strcat(b, "OpenTSDBHTTP");
+ break;
+ case EXPORTING_CONNECTOR_TYPE_PROMETHEUS_REMOTE_WRITE:
+#if ENABLE_PROMETHEUS_REMOTE_WRITE
+ buffer_strcat(b, "PrometheusRemoteWrite");
+#endif
+ break;
+ case EXPORTING_CONNECTOR_TYPE_KINESIS:
+#if HAVE_KINESIS
+ buffer_strcat(b, "Kinesis");
+#endif
+ break;
+ case EXPORTING_CONNECTOR_TYPE_PUBSUB:
+#if ENABLE_EXPORTING_PUBSUB
+ buffer_strcat(b, "Pubsub");
+#endif
+ break;
+ case EXPORTING_CONNECTOR_TYPE_MONGODB:
+#if HAVE_MONGOC
+ buffer_strcat(b, "MongoDB");
+#endif
+ break;
+ default:
+ buffer_strcat(b, "Unknown");
+ }
+
+ count++;
+ }
+}
+
/**
* Exporting Clean Engine
*
* Clean all variables allocated inside engine structure
*
- * @param en a pointer to the strcuture that will be cleaned.
+ * @param en a pointer to the structure that will be cleaned.
*/
static void exporting_clean_engine()
{