-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
inputs.prometheus - http_headers - host header ignored #15192
Comments
Hi,
How are you determining that this is not occurring? Do you have a network trace demonstrating this? The headers are set here right before any request. |
Hello, unfortunaely not, I just tried a telegraf --test vs a curl with -H 'Host:' -> with the first one, Apache receive "localhost", second one is example.org (curl) I tried with 127.0.0.1 & the IP of pod. |
So after looking at this more, I remembered that the host key is a special header. I've seen this before, and sure enough: https://github.com/influxdata/telegraf/pull/14481/files I've put up #15195 with a fix |
Thank you very much @powersj ! So fast! In addition, out of scope but do you know if telegraf-operator is always supported? (related to the issue: influxdata/telegraf-operator#137) |
The individual who built and maintained that left the company last year. I don't think anyone has decided to pick it up and it is why the support statement was updated to say no official support. If there was a specific PR that needed a review I think we might be able to convince someone to look at it who knows the operator/k8s framework better than I do 😄 |
Thank you for the details! |
Relevant telegraf.conf
Logs from Telegraf
System info
telegraf 1.29, k8s 1.28
Docker
No response
Steps to reproduce
Expected behavior
The Host header is forwarded
Actual behavior
The Host header is not forwarded
Additional info
The goal is request the pod itself via sidecar based on a specific virtual host.
Currently, if I try curl -H 'Host: example.org' http://127.0.0.1/metrics, I can extract datas.
But with telegraf, the Host is not forwarded.
Host received from access log: localhost
The text was updated successfully, but these errors were encountered: