Skip to content

Commit

Permalink
Update prometheus/common (#1006)
Browse files Browse the repository at this point in the history
This pulls in support for specifying proxy connect headers. Update
CONFIGURATION.md and example.yml to match.

Signed-off-by: Marcelo E. Magallon <[email protected]>
  • Loading branch information
mem authored Dec 15, 2022
1 parent c5689ad commit 35f2661
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 380 deletions.
6 changes: 6 additions & 0 deletions CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ The other placeholders are specified separately.
# HTTP proxy server to use to connect to the targets.
[ proxy_url: <string> ]

# Headers to pass to the HTTP proxy. If set, proxy_url must also be set.
[ proxy_connect_header:
<string>: <string> ...
...
]

# Skip DNS resolution and URL change when an HTTP proxy (proxy_url) is set.
[ skip_resolve_phase_with_proxy: <boolean> | default = false ]

Expand Down
7 changes: 7 additions & 0 deletions example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ modules:
http:
proxy_url: "http://127.0.0.1:3128"
skip_resolve_phase_with_proxy: true
http_with_proxy_and_headers:
prober: http
http:
proxy_url: "http://127.0.0.1:3128"
proxy_connect_header:
Proxy-Authorization:
- Bearer token
http_post_2xx:
prober: http
timeout: 5s
Expand Down
13 changes: 7 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ require (
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
github.com/prometheus/common v0.37.0
github.com/prometheus/common v0.39.0
github.com/prometheus/exporter-toolkit v0.8.2
golang.org/x/net v0.2.0
golang.org/x/net v0.4.0
google.golang.org/grpc v1.51.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/yaml.v2 v2.4.0
Expand All @@ -27,15 +27,16 @@ require (
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/prometheus/procfs v0.8.0 // indirect
golang.org/x/crypto v0.0.0-20221012134737-56aed061732a // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect
golang.org/x/oauth2 v0.3.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 // indirect
Expand Down
Loading

0 comments on commit 35f2661

Please sign in to comment.