Comments (13)
Any parameters would go via the configuration file, as the urls would get too crazy otherwise.
Right now you'd have to use the tcp module, but I'd accept a PR to add generic proxy functionality. This should probably also consider the possibility of socks proxies for tcp etc.
from blackbox_exporter.
Would this one be the right way to go?
https://github.com/lausser/blackbox_exporter/commit/9a04f098bac0872adfeb89497f34454c78b7e379
Tested with http- and socks-proxies, seems fine so far. When you say "generic proxy functionality", would this mean, that copying the socks part to tcp.go and introducing the proxy-config-settinh for tcp is enough?
from blackbox_exporter.
That's the basic idea. Prometheus also has a proxy option, so this logic and the naming should be shared.
from blackbox_exporter.
Any update on proxy support ?
from blackbox_exporter.
I couldn't get the HTTP_PROXY environment variables to be used by blackbox_exporter myself even though Jean-Daniel's opening comment says that he was able to use them?
I managed to fix this for myself by adding http.ProxyFromEnvironment into client.Transport in http.go, i.e. line 125 now reads:
client.Transport = &http.Transport{
TLSClientConfig: tlsconfig,
Dial: dial,
Proxy: http.ProxyFromEnvironment,
}
from blackbox_exporter.
@pj42 In fact, I never tried to use HTTP_PROXY. This was just an hypothetical workaround suggestion.
I'm using a patched version that support proxy configuration. My patch is tailored for my specific need and is not generic enough to become a PR though. That'w why I never proposed it.
from blackbox_exporter.
Ok well support for HTTP_PROXY (and NO_PROXY) now working well for me. Commit is here:
from blackbox_exporter.
My pull request for this now merged in the main code-base.
Can now do:
HTTP_PROXY="http://proxy-host:8080" NO_PROXY=".mydomain" ./blackbox_exporter
Enjoy :-)
from blackbox_exporter.
I have needed a similar setting and created #129 . Feel free to continue from there or let me know if I should change something.
from blackbox_exporter.
Hey.
This pull request is not necessary, http_proxy support has been added to blackbox_exporter since v0.4.0
See notes at top of https://github.com/prometheus/blackbox_exporter/releases/tag/v0.4.0
[FEATURE] HTTP support taking proxy from enviroment
Cheers,
Paul.
from blackbox_exporter.
@pj42 This pull requests builds on the functionality from the v0.4.0 branch and adds an additional http_proxy
setting to the http probe config to specify a proxy server that takes precedence over the environment variables if specified.
My current use-cases requires me to monitor most of the services directly (no proxy) as well as several proxy servers (different proxy settings).
from blackbox_exporter.
Ah ok then yes makes sense if you require more than one different proxy server to be used by a single running blackbox exporter.
from blackbox_exporter.
This was just added.
from blackbox_exporter.
Related Issues (20)
- Inconsistent support of IPv6 literals HOT 3
- Feature request: probe to prometheus.io is not helpful, should make options or pulldowns HOT 2
- packaged deb version of blackbox_exporter
- Implement DHCP HOT 2
- Recent Probes List - add timestamp or log id as label and column for better identification
- Twistlock CVE's Found 1/24/23 HOT 2
- Cut a new release? HOT 1
- Same blackbox.yml to monitor different proxies
- source_ip_address option enhancement
- Incorrect State in Prometheus HOT 1
- RFE: Expose DNS prober metrics for the queried name and query type
- Blackbox ICMP probe getting failed for the servers which are pinging. HOT 2
- Allow setting fail_if_body_matches_regexp dynamically
- Feature request: DNS RRSIG signature validity time
- Inconsistent alerts triggered by the Prometheus alert manager
- unknown cipher: TLS_RSA_WITH_AES_128_CBC_SHA HOT 1
- TPC Prober only returns 0 values
- Probe fails with "target" as URL parameter in URL to probe.
- feature: param to not resolve target address
- feature request: please sign your releases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blackbox_exporter.