From aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 Feb 2023 17:11:30 +0100 Subject: Adding upstream version 1.38.0. Signed-off-by: Daniel Baumann --- exporting/opentsdb/README.md | 20 +++++++++++++------- exporting/opentsdb/opentsdb.c | 8 ++++---- 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'exporting/opentsdb') diff --git a/exporting/opentsdb/README.md b/exporting/opentsdb/README.md index c9b1ab95a..c6069f372 100644 --- a/exporting/opentsdb/README.md +++ b/exporting/opentsdb/README.md @@ -1,14 +1,19 @@ # Export metrics to OpenTSDB -You can use the OpenTSDB connector for the [exporting engine](/exporting/README.md) to archive your agent's metrics to OpenTSDB -databases for long-term storage, further analysis, or correlation with data from other sources. +You can use the OpenTSDB connector for +the [exporting engine](https://github.com/netdata/netdata/blob/master/exporting/README.md) to archive your agent's +metrics to OpenTSDB databases for long-term storage, further analysis, or correlation with data from other sources. ## Configuration @@ -21,7 +26,8 @@ directory and set the following options: destination = localhost:4242 ``` -Add `:http` or `:https` modifiers to the connector type if you need to use other than a plaintext protocol. For example: `opentsdb:http:my_opentsdb_instance`, +Add `:http` or `:https` modifiers to the connector type if you need to use other than a plaintext protocol. For +example: `opentsdb:http:my_opentsdb_instance`, `opentsdb:https:my_opentsdb_instance`. You can set basic HTTP authentication credentials using ```conf @@ -29,7 +35,7 @@ Add `:http` or `:https` modifiers to the connector type if you need to use other password = my_password ``` -The OpenTSDB connector is further configurable using additional settings. See the [exporting reference -doc](/exporting/README.md#options) for details. +The OpenTSDB connector is further configurable using additional settings. See +the [exporting reference doc](https://github.com/netdata/netdata/blob/master/exporting/README.md#options) for details. diff --git a/exporting/opentsdb/opentsdb.c b/exporting/opentsdb/opentsdb.c index a974c1264..fc01ae461 100644 --- a/exporting/opentsdb/opentsdb.c +++ b/exporting/opentsdb/opentsdb.c @@ -45,7 +45,7 @@ int init_opentsdb_telnet_instance(struct instance *instance) instance->prepare_header = NULL; instance->check_response = exporting_discard_response; - instance->buffer = (void *)buffer_create(0); + instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { error("EXPORTING: cannot create buffer for opentsdb telnet exporting connector instance %s", instance->config.name); return 1; @@ -102,7 +102,7 @@ int init_opentsdb_http_instance(struct instance *instance) instance->prepare_header = opentsdb_http_prepare_header; instance->check_response = exporting_discard_response; - instance->buffer = (void *)buffer_create(0); + instance->buffer = (void *)buffer_create(0, &netdata_buffers_statistics.buffers_exporters); if (!instance->buffer) { error("EXPORTING: cannot create buffer for opentsdb HTTP exporting connector instance %s", instance->config.name); return 1; @@ -150,7 +150,7 @@ void sanitize_opentsdb_label_value(char *dst, const char *src, size_t len) int format_host_labels_opentsdb_telnet(struct instance *instance, RRDHOST *host) { if(!instance->labels_buffer) - instance->labels_buffer = buffer_create(1024); + instance->labels_buffer = buffer_create(1024, &netdata_buffers_statistics.buffers_exporters); if (unlikely(!sending_labels_configured(instance))) return 0; @@ -283,7 +283,7 @@ void opentsdb_http_prepare_header(struct instance *instance) int format_host_labels_opentsdb_http(struct instance *instance, RRDHOST *host) { if (!instance->labels_buffer) - instance->labels_buffer = buffer_create(1024); + instance->labels_buffer = buffer_create(1024, &netdata_buffers_statistics.buffers_exporters); if (unlikely(!sending_labels_configured(instance))) return 0; -- cgit v1.2.3