diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-08-18 16:16:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-18 16:16:24 +0300 |
commit | 7d8dac14809f1eee5b16bd971953aa1a7501ff54 (patch) | |
tree | 31d141b3d8cf1bfc95ca0a9f2c8dcb2ca6c1c0a0 /exporting | |
parent | 2ceb75a1f11ff76eacc77f6474d09f029c4e3c27 (diff) |
Fix HTTP header for the remote write exporting connector (#9775)
Diffstat (limited to 'exporting')
-rw-r--r-- | exporting/prometheus/remote_write/remote_write.c | 2 | ||||
-rw-r--r-- | exporting/tests/test_exporting_engine.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/exporting/prometheus/remote_write/remote_write.c b/exporting/prometheus/remote_write/remote_write.c index 28ddc7e159..6106146164 100644 --- a/exporting/prometheus/remote_write/remote_write.c +++ b/exporting/prometheus/remote_write/remote_write.c @@ -39,7 +39,7 @@ int prometheus_remote_write_send_header(int *sock, struct instance *instance) "Content-Length: %zu\r\n" "Content-Type: application/x-www-form-urlencoded\r\n\r\n", connector_specific_config->remote_write_path, - instance->engine->config.hostname, + instance->config.destination, buffer_strlen((BUFFER *)instance->buffer)); size_t header_len = buffer_strlen(header); diff --git a/exporting/tests/test_exporting_engine.c b/exporting/tests/test_exporting_engine.c index d16d435a38..eb429a02e3 100644 --- a/exporting/tests/test_exporting_engine.c +++ b/exporting/tests/test_exporting_engine.c @@ -1192,7 +1192,7 @@ static void test_prometheus_remote_write_send_header(void **state) expect_string( __wrap_send, buf, "POST /receive HTTP/1.1\r\n" - "Host: test-host\r\n" + "Host: localhost\r\n" "Accept: */*\r\n" "X-Prometheus-Remote-Write-Version: 0.1.0\r\n" "Content-Length: 11\r\n" |