-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Blackbox Exporter seems to ignore Host Header for HTTP probe #936
Comments
Have the same problem. Tried versions 0.17.0 and 0.21.1 with the same results.
|
I have the similar issue, the blackbox return 404 for working endpoints , it fails with following log : `Logs for the probe: Metrics that would have been returned: Module configuration: As curl and browsers are working without any issues. |
Host operating system: output of uname -a
Running Blackbox Exporter container on ECS
Linux ip-XXX-XXX-XXX-XXX.eu-west-1.compute.internal 4.14.209-160.339.amzn2.x86_64 #1 SMP Wed Dec 16 22:44:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
blackbox_exporter version: output of blackbox_exporter --version
What is the blackbox.yml module config.
What is the prometheus.yml scrape config.
What logging output did you get from adding &debug=true to the probe URL?
What did you do that produced an error?
I have added a new scrape target to the configuration which uses the http_2xx module to do http checks.
What did you expect to see?
I expected the hostname rather than the IP to be used in the url:
ts=2022-06-22T09:51:51.597315207Z caller=client.go:252 module=http_2xx target=https://my.super.host/actuator/health level=info msg="Making HTTP request" url=https://my.super.host/actuator/health host=my.super.host
What did you see instead?
The IP is used in the url rather than the hostname even though it has been specified in the "headers" section of the Blackbox Exporter config. The request seems to be failing with a 403 because the host header isn't being passed through to the service when it makes the call using the IP:
Using curl works as expected:
Removing the host header replicates the issue which Blackbox Exporter is encountering:
The text was updated successfully, but these errors were encountered: