summaryrefslogtreecommitdiffstats
path: root/exporting
diff options
context:
space:
mode:
Diffstat (limited to 'exporting')
-rw-r--r--exporting/exporting_engine.c58
-rw-r--r--exporting/prometheus/prometheus.c3
2 files changed, 61 insertions, 0 deletions
diff --git a/exporting/exporting_engine.c b/exporting/exporting_engine.c
index 45de213a82..70aceea8c1 100644
--- a/exporting/exporting_engine.c
+++ b/exporting/exporting_engine.c
@@ -4,6 +4,64 @@
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
*
diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c
index 4222dce568..6759313c33 100644
--- a/exporting/prometheus/prometheus.c
+++ b/exporting/prometheus/prometheus.c
@@ -794,6 +794,9 @@ static inline time_t prometheus_preparation(
time_t now,
PROMETHEUS_OUTPUT_OPTIONS output_options)
{
+#ifndef UNIT_TESTING
+ analytics_log_prometheus();
+#endif
if (!server || !*server)
server = "default";