blackbox_exporter icon indicating copy to clipboard operation
blackbox_exporter copied to clipboard

Add source_ip_address support to http probes

Open bobrik opened this issue 3 years ago • 4 comments

This is a logical continuation of #262.

It's the same as #765 but without changing prometheus/common as @roidelapluie suggested.

Signed-off-by: Ivan Babrou [email protected]

bobrik avatar Mar 17 '21 17:03 bobrik

@roidelapluie, this approach doesn't seem to work very well, given that there may be multiple layers of transport.

bobrik avatar Mar 17 '21 21:03 bobrik

@roidelapluie, this approach doesn't seem to work very well, given that there may be multiple layers of transport.

Can you be more explicit?

roidelapluie avatar Mar 29 '21 21:03 roidelapluie

Look at the failed test:

panic: interface conversion: http.RoundTripper is *config.basicAuthRoundTripper, not *http.Transport

I don't see a good way to update DialContext in http.RoundTripper that is wrapped by config.basicAuthRoundTripper.

bobrik avatar Mar 29 '21 21:03 bobrik

Hello @bobrik . Now the HTTP client supports passing special dialcontext funcs so we could implement all this in the blackbox exporter: https://github.com/prometheus/common/pull/291

roidelapluie avatar Apr 27 '21 11:04 roidelapluie