Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HTTP header for the remote write exporting connector #9775

Merged
merged 2 commits into from Aug 18, 2020

Conversation

vlvkobal
Copy link
Contributor

@vlvkobal vlvkobal commented Aug 18, 2020

Summary

Fixes #7676

Component Name

exporting engine, backends

Test Plan
  1. Configure an exporting connector
[prometheus_remote_write:test_instance]
enabled = yes
destination = localhost:1234
remote write URL path = /receive
data source = as collected
update every = 2
send charts matching = system.processes

Check the HTTP Host filed using nc -l -p 1234, it should be set to localhost:1234.

  1. Configure the backends subsytem
[backend]
  enabled = yes
  type = prometheus_remote_write
  data source = as collected
  destination = localhost:1234
  send charts matching = system.processes

Check the HTTP Host filed using nc -l -p 1234, it should be set to localhost:1234.

Copy link
Contributor

@thiagoftsm thiagoftsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is working as expected and it is fixing the issue, but I would like to call attention that we are reading the destination value and we are not parsing it inside read_config.c to test if it is a valid value, but this is subject for another possible PR.
LGTM!

@vlvkobal vlvkobal merged commit 7d8dac1 into netdata:master Aug 18, 2020
@vlvkobal vlvkobal deleted the fix-remote-write-header branch August 18, 2020 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

backend http request need proper Host header
3 participants