From e970e0b37b8bd7f246feb3f70c4136418225e434 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 1 Dec 2021 07:15:04 +0100 Subject: Adding upstream version 1.32.0. Signed-off-by: Daniel Baumann --- exporting/opentsdb/README.md | 7 ++++++- exporting/opentsdb/opentsdb.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'exporting/opentsdb') diff --git a/exporting/opentsdb/README.md b/exporting/opentsdb/README.md index 3765ad271..0ca6d2449 100644 --- a/exporting/opentsdb/README.md +++ b/exporting/opentsdb/README.md @@ -22,7 +22,12 @@ directory and set the following options: ``` 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`. +`opentsdb:https:my_opentsdb_instance`. You can set basic HTTP authentication credentials using + +```conf + username = my_username + password = my_password +``` The OpenTSDB connector is further configurable using additional settings. See the [exporting reference doc](/exporting/README.md#options) for details. diff --git a/exporting/opentsdb/opentsdb.c b/exporting/opentsdb/opentsdb.c index 1310c150e..7ed88fd6d 100644 --- a/exporting/opentsdb/opentsdb.c +++ b/exporting/opentsdb/opentsdb.c @@ -269,10 +269,12 @@ void opentsdb_http_prepare_header(struct instance *instance) simple_connector_data->last_buffer->header, "POST /api/put HTTP/1.1\r\n" "Host: %s\r\n" + "%s" "Content-Type: application/json\r\n" "Content-Length: %lu\r\n" "\r\n", instance->config.destination, + simple_connector_data->auth_string ? simple_connector_data->auth_string : "", buffer_strlen(simple_connector_data->last_buffer->buffer)); return; -- cgit v1.2.3