blackbox_exporter: Redirect to different HTTPS host broken
Host operating system: output of uname -a
Linux probe 4.9.50 #1 SMP Thu Sep 14 08:57:58 UTC 2017 x86_64 Intel® Xeon® CPU E5-2630 v2 @ 2.60GHz GenuineIntel GNU/Linux
blackbox_exporter version: output of blackbox_exporter -version
blackbox_exporter, version 0.9.1 (branch: HEAD, revision: 2272b4e637a591168d5b24a3943e15ac15ecba80) build user: root@27fc71dcd45b build date: 20170921-13:19:29 go version: go1.8.3
What is the blackbox.yml module config.
http_2xx_ip4:
prober: http
timeout: 5s
http:
preferred_ip_protocol: "ip4"
Log snippet
ts=2017-09-26T11:30:56.950294668Z caller=main.go:115 module=http_2xx_ip4 target=http://foo.com level=info msg="Beginning probe" probe=http timeout_seconds=4.5
ts=2017-09-26T11:30:56.950378987Z caller=utils.go:43 module=http_2xx_ip4 target=http://foo.com level=info msg="Resolving target address" preferred_ip_protocol=ip4
ts=2017-09-26T11:30:56.950762868Z caller=utils.go:63 module=http_2xx_ip4 target=http://foo.com level=info msg="Resolved target address" ip=127.16.1.5
ts=2017-09-26T11:30:56.950794289Z caller=http.go:190 module=http_2xx_ip4 target=http://foo.com level=info msg="Making HTTP request" url=http://[127.16.1.5] host=foo.com
ts=2017-09-26T11:30:56.951863609Z caller=http.go:150 module=http_2xx_ip4 target=http://foo.com level=info msg="Received redirect" url=https://bar.com
ts=2017-09-26T11:30:56.954761741Z caller=http.go:194 module=http_2xx_ip4 target=http://foo.com level=error msg="Error for HTTP request" err="Get https://bar.com: x509: certificate is valid for www.bar.com, bar.com, not foo.com"
ts=2017-09-26T11:30:56.954796702Z caller=main.go:128 module=http_2xx_ip4 target=http://foo.com level=error msg="Probe failed" duration_seconds=0.004475863
What did you expect to see?
I’d expect a probe to succeed.
What did you see instead?
Probe fails.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 26
- Comments: 30 (13 by maintainers)
Commits related to this issue
- Hacky implementation of option #2 from https://github.com/prometheus/blackbox_exporter/issues/237 In this we have to add an option to pass a *tls.Config to http_config. Then we can modify the ServerN... — committed to jacksontj/blackbox_exporter by jacksontj 5 years ago
- Hacky implementation of option #1 from https://github.com/prometheus/blackbox_exporter/issues/237 In this we have to add an option to pass a *tls.Config to http_config. Then we can modify the ServerN... — committed to jacksontj/blackbox_exporter by jacksontj 5 years ago
- Better handling of HTTP redirects. If the redirect is to a different host, don't set ServerName. Fixes #237. Signed-off-by: Brian Brazil <brian.brazil@robustperception.io> — committed to prometheus/blackbox_exporter by brian-brazil 5 years ago
- Better handling of HTTP redirects. If the redirect is to a different host, don't set ServerName. Fixes #237. Signed-off-by: Brian Brazil <brian.brazil@robustperception.io> — committed to prometheus/blackbox_exporter by brian-brazil 5 years ago
- Better handling of HTTP redirects. If the redirect is to a different host, don't set ServerName. Fixes #237. Signed-off-by: Brian Brazil <brian.brazil@robustperception.io> — committed to prometheus/blackbox_exporter by brian-brazil 5 years ago
- Better handling of HTTP redirects. If the redirect is to a different host, don't set ServerName. Fixes #237. Signed-off-by: Brian Brazil <brian.brazil@robustperception.io> — committed to prometheus/blackbox_exporter by brian-brazil 5 years ago
- Better handling of HTTP redirects. If the redirect is to a different host, don't set ServerName. Fixes #237. Signed-off-by: Brian Brazil <brian.brazil@robustperception.io> — committed to prometheus/blackbox_exporter by brian-brazil 5 years ago
- Better handling of HTTP redirects. If the redirect is to a different host, don't set ServerName. Fixes #237. Signed-off-by: Brian Brazil <brian.brazil@robustperception.io> — committed to prometheus/blackbox_exporter by brian-brazil 5 years ago
Hi, Any updates about this issue? From my really low understanding of the issue, would it be interesting to process redirects inside Blackbox exporter instead of using RoundTripper behavior? I honestly did not check for changes on net/http.