summaryrefslogtreecommitdiffstats
path: root/exporting/exporting_engine.h
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2020-04-06 09:26:25 +0300
committerGitHub <noreply@github.com>2020-04-06 09:26:25 +0300
commitebbce7c7773a886d222dbaa60d098b6c25150f69 (patch)
tree03848706164fba421a72c9bedf25f421ffdafa25 /exporting/exporting_engine.h
parent50209f1971280324b0e692ac01bf45e809874856 (diff)
Prometheus web api connector (#8540)
* Fix the Prometheus web API code in the exporting engine * Rename connector types * Remove the conditional compilation of the exporting engine * Use labels instead of tags * Fix the exporter configuration * Document functions * Add unit tests
Diffstat (limited to 'exporting/exporting_engine.h')
-rw-r--r--exporting/exporting_engine.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/exporting/exporting_engine.h b/exporting/exporting_engine.h
index 1a3a3ecd09..8a46dd5d3d 100644
--- a/exporting/exporting_engine.h
+++ b/exporting/exporting_engine.h
@@ -14,10 +14,10 @@
extern struct config exporting_config;
#define EXPORTING_UPDATE_EVERY_OPTION_NAME "update every"
-#define EXPORTING_UPDATE_EVERY_DEFAULT 10
+#define EXPORTING_UPDATE_EVERY_DEFAULT 10
typedef enum exporting_options {
- EXPORTING_OPTION_NONE = 0,
+ EXPORTING_OPTION_NON = 0,
EXPORTING_SOURCE_DATA_AS_COLLECTED = (1 << 0),
EXPORTING_SOURCE_DATA_AVERAGE = (1 << 1),
@@ -42,10 +42,22 @@ typedef enum exporting_options {
(instance->config.options & EXPORTING_OPTION_SEND_AUTOMATIC_LABELS && \
label->label_source != LABEL_SOURCE_NETDATA_CONF))
+typedef enum exporting_connector_types {
+ EXPORTING_CONNECTOR_TYPE_UNKNOWN, // Invalid type
+ EXPORTING_CONNECTOR_TYPE_GRAPHITE, // Send plain text to Graphite
+ EXPORTING_CONNECTOR_TYPE_OPENTSDB_USING_TELNET, // Send data to OpenTSDB using telnet API
+ EXPORTING_CONNECTOR_TYPE_OPENTSDB_USING_HTTP, // Send data to OpenTSDB using HTTP API
+ EXPORTING_CONNECTOR_TYPE_JSON, // Stores the data using JSON.
+ EXPORTING_CONNECTOR_TYPE_PROMETHEUS_REMOTE_WRITE, // The user selected to use Prometheus backend
+ EXPORTING_CONNECTOR_TYPE_KINESIS, // Send message to AWS Kinesis
+ EXPORTING_CONNECTOR_TYPE_MONGODB, // Send data to MongoDB collection
+ EXPORTING_CONNECTOR_TYPE_NUM // Number of backend types
+} EXPORTING_CONNECTOR_TYPE;
+
struct engine;
struct instance_config {
- BACKEND_TYPE type;
+ EXPORTING_CONNECTOR_TYPE type;
const char *name;
const char *destination;
@@ -150,10 +162,12 @@ struct engine {
struct instance *instance_root;
};
+extern struct instance *prometheus_exporter_instance;
+
void *exporting_main(void *ptr);
struct engine *read_exporting_config();
-BACKEND_TYPE exporting_select_type(const char *type);
+EXPORTING_CONNECTOR_TYPE exporting_select_type(const char *type);
int init_connectors(struct engine *engine);
@@ -187,4 +201,6 @@ void simple_connector_worker(void *instance_p);
int send_internal_metrics(struct engine *engine);
+#include "exporting/prometheus/prometheus.h"
+
#endif /* NETDATA_EXPORTING_ENGINE_H */