普罗米修斯blackbox_exporter没有跳过SSL检查



我在配置中启用了insecure_skip_verify参数,但是blackbox_export在SSL检查中仍然失败。

modules:
http_2xx:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
method: GET
preferred_ip_protocol: "ip4"
ip_protocol_fallback: false
no_follow_redirects: false
fail_if_ssl: false
fail_if_not_ssl: false
tls_config:
insecure_skip_verify: true
root@monitor-1:~# curl "http://localhost:9115/probe?target=https://www.263.com&module=http_2xx&debug=true"
Logs for the probe:
ts=2021-01-19T13:26:02.336532681Z caller=main.go:304 module=http_2xx target=https://www.263.com level=info msg="Beginning probe" probe=http timeout_seconds=119.5
ts=2021-01-19T13:26:02.33679155Z caller=http.go:342 module=http_2xx target=https://www.263.com level=info msg="Resolving target address" ip_protocol=ip6
ts=2021-01-19T13:26:02.341423219Z caller=http.go:342 module=http_2xx target=https://www.263.com level=info msg="Resolved target address" ip=211.150.65.26
ts=2021-01-19T13:26:02.341519047Z caller=client.go:252 module=http_2xx target=https://www.263.com level=info msg="Making HTTP request" url=https://211.150.65.26 host=www.263.com
ts=2021-01-19T13:26:02.354176072Z caller=main.go:119 module=http_2xx target=https://www.263.com level=error msg="Error for HTTP request" err="Get "https://211.150.65.26": x509: certificate is valid for *.263.net, 263.net, not www.263.com"
ts=2021-01-19T13:26:02.354254679Z caller=main.go:119 module=http_2xx target=https://www.263.com level=info msg="Response timings for roundtrip" roundtrip=0 start=2021-01-19T13:26:02.34163085Z dnsDone=2021-01-19T13:26:02.34163085Z connectDone=2021-01-19T13:26:02.345415737Z gotConn=0001-01-01T00:00:00Z responseStart=0001-01-01T00:00:00Z end=0001-01-01T00:00:00Z
ts=2021-01-19T13:26:02.354307734Z caller=main.go:304 module=http_2xx target=https://www.263.com level=error msg="Probe failed" duration_seconds=0.017698452

我认为你应该把目标中的HTTPS替换为HTTP:

curl "http://localhost:9115/probe?target=http://www.263.com&module=http_2xx&debug=true"

如果blackbox配置中的更改没有生效,请尝试重新启动blackbox导出服务

最新更新