summaryrefslogtreecommitdiffstats
path: root/exporting/exporting_engine.h
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2020-03-12 13:28:43 +0200
committerGitHub <noreply@github.com>2020-03-12 13:28:43 +0200
commitbc0ca9b1b3cbdd6d1a76d2150080dff79e116e24 (patch)
tree2d2c59e6f32e831612a257c73e81bfdf5f65c361 /exporting/exporting_engine.h
parentbec7b83e19944a7e844c6c7777f92ccba6d504e3 (diff)
Add a Prometheus Remote Write connector to the exporting engine (#8292)
* Copy files from the Prometheus remote write backend * Update the documentation * Rename backend -> exporting * Add the connector to the Netdata build * Separate files for the remote write connector * Add an initializer and formatters * Read a connector specific configuration option * Add a separate function for header sending * Use labels instead of tags * Separate write request for every instance * Add unit tests
Diffstat (limited to 'exporting/exporting_engine.h')
-rw-r--r--exporting/exporting_engine.h44
1 files changed, 9 insertions, 35 deletions
diff --git a/exporting/exporting_engine.h b/exporting/exporting_engine.h
index c1e63a42eb..6a8296a19b 100644
--- a/exporting/exporting_engine.h
+++ b/exporting/exporting_engine.h
@@ -13,41 +13,8 @@
extern struct config exporting_config;
-#define EXPORTER_DATA_SOURCE "data source"
-#define EXPORTER_DATA_SOURCE_DEFAULT "average"
-
-#define EXPORTER_DESTINATION "destination"
-#define EXPORTER_DESTINATION_DEFAULT "localhost"
-
-#define EXPORTER_UPDATE_EVERY "update every"
-#define EXPORTER_UPDATE_EVERY_DEFAULT 10
-
-#define EXPORTER_BUF_ONFAIL "buffer on failures"
-#define EXPORTER_BUF_ONFAIL_DEFAULT 10
-
-#define EXPORTER_TIMEOUT_MS "timeout ms"
-#define EXPORTER_TIMEOUT_MS_DEFAULT 10000
-
-#define EXPORTER_SEND_CHART_MATCH "send charts matching"
-#define EXPORTER_SEND_CHART_MATCH_DEFAULT "*"
-
-#define EXPORTER_SEND_HOST_MATCH "send hosts matching"
-#define EXPORTER_SEND_HOST_MATCH_DEFAULT "localhost *"
-
-#define EXPORTER_SEND_CONFIGURED_LABELS "send configured labels"
-#define EXPORTER_SEND_CONFIGURED_LABELS_DEFAULT CONFIG_BOOLEAN_YES
-
-#define EXPORTER_SEND_AUTOMATIC_LABELS "send automatic labels"
-#define EXPORTER_SEND_AUTOMATIC_LABELS_DEFAULT CONFIG_BOOLEAN_NO
-
-#define EXPORTER_SEND_NAMES "send names instead of ids"
-#define EXPORTER_SEND_NAMES_DEFAULT CONFIG_BOOLEAN_YES
-
-#define EXPORTER_KINESIS_STREAM_NAME "stream name"
-#define EXPORTER_KINESIS_STREAM_NAME_DEFAULT "netdata"
-
-#define EXPORTER_AWS_ACCESS_KEY_ID "aws_access_key_id"
-#define EXPORTER_AWS_SECRET_ACCESS_KEY "aws_secret_access_key"
+#define EXPORTING_UPDATE_EVERY_OPTION_NAME "update every"
+#define EXPORTING_UPDATE_EVERY_DEFAULT 10
typedef enum exporting_options {
EXPORTING_OPTION_NONE = 0,
@@ -98,6 +65,10 @@ struct simple_connector_config {
int default_port;
};
+struct prometheus_remote_write_specific_config {
+ char *remote_write_path;
+};
+
struct aws_kinesis_specific_config {
char *stream_name;
char *auth_key_id;
@@ -152,6 +123,9 @@ struct instance {
int (*end_host_formatting)(struct instance *instance, RRDHOST *host);
int (*end_batch_formatting)(struct instance *instance);
+ int (*send_header)(int *sock, struct instance *instance);
+ int (*check_response)(BUFFER *buffer, struct instance *instance);
+
void *connector_specific_data;
size_t index;