diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-04-13 08:39:52 -0400 |
---|---|---|
committer | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-04-13 08:42:22 -0400 |
commit | e2874320fc027f7ab51ab3e115d5b1889b8fd747 (patch) | |
tree | cd755ef9b8522634c61aed9888239c9b67394157 /exporting/exporting_engine.h | |
parent | 353780082c0ac8525e5b52aa8a29bbf5b70871e8 (diff) |
Revert changes since v1.21 in pereparation for hotfix release.
Diffstat (limited to 'exporting/exporting_engine.h')
-rw-r--r-- | exporting/exporting_engine.h | 77 |
1 files changed, 17 insertions, 60 deletions
diff --git a/exporting/exporting_engine.h b/exporting/exporting_engine.h index 94daf98e05..1a3a3ecd09 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_NON = 0, + EXPORTING_OPTION_NONE = 0, EXPORTING_SOURCE_DATA_AS_COLLECTED = (1 << 0), EXPORTING_SOURCE_DATA_AVERAGE = (1 << 1), @@ -42,22 +42,10 @@ 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 { - EXPORTING_CONNECTOR_TYPE type; + BACKEND_TYPE type; const char *name; const char *destination; @@ -99,42 +87,18 @@ struct engine_config { }; struct stats { - collected_number buffered_metrics; - collected_number lost_metrics; - collected_number sent_metrics; - collected_number buffered_bytes; - collected_number lost_bytes; - collected_number sent_bytes; - collected_number received_bytes; - collected_number transmission_successes; - collected_number data_lost_events; - collected_number reconnects; - collected_number transmission_failures; - collected_number receptions; - - int initialized; - - RRDSET *st_metrics; - RRDDIM *rd_buffered_metrics; - RRDDIM *rd_lost_metrics; - RRDDIM *rd_sent_metrics; - - RRDSET *st_bytes; - RRDDIM *rd_buffered_bytes; - RRDDIM *rd_lost_bytes; - RRDDIM *rd_sent_bytes; - RRDDIM *rd_received_bytes; - - RRDSET *st_ops; - RRDDIM *rd_transmission_successes; - RRDDIM *rd_data_lost_events; - RRDDIM *rd_reconnects; - RRDDIM *rd_transmission_failures; - RRDDIM *rd_receptions; - - RRDSET *st_rusage; - RRDDIM *rd_user; - RRDDIM *rd_system; + collected_number chart_buffered_metrics; + collected_number chart_lost_metrics; + collected_number chart_sent_metrics; + collected_number chart_buffered_bytes; + collected_number chart_received_bytes; + collected_number chart_sent_bytes; + collected_number chart_receptions; + collected_number chart_transmission_successes; + collected_number chart_transmission_failures; + collected_number chart_data_lost_events; + collected_number chart_lost_bytes; + collected_number chart_reconnects; }; struct instance { @@ -186,12 +150,10 @@ struct engine { struct instance *instance_root; }; -extern struct instance *prometheus_exporter_instance; - void *exporting_main(void *ptr); struct engine *read_exporting_config(); -EXPORTING_CONNECTOR_TYPE exporting_select_type(const char *type); +BACKEND_TYPE exporting_select_type(const char *type); int init_connectors(struct engine *engine); @@ -217,17 +179,12 @@ int end_chart_formatting(struct engine *engine, RRDSET *st); int end_host_formatting(struct engine *engine, RRDHOST *host); int end_batch_formatting(struct engine *engine); int flush_host_labels(struct instance *instance, RRDHOST *host); -int simple_connector_update_buffered_bytes(struct instance *instance); int exporting_discard_response(BUFFER *buffer, struct instance *instance); void simple_connector_receive_response(int *sock, struct instance *instance); void simple_connector_send_buffer(int *sock, int *failures, struct instance *instance); void simple_connector_worker(void *instance_p); -void create_main_rusage_chart(RRDSET **st_rusage, RRDDIM **rd_user, RRDDIM **rd_system); -void send_main_rusage(RRDSET *st_rusage, RRDDIM *rd_user, RRDDIM *rd_system); -void send_internal_metrics(struct instance *instance); - -#include "exporting/prometheus/prometheus.h" +int send_internal_metrics(struct engine *engine); #endif /* NETDATA_EXPORTING_ENGINE_H */ |