-
Notifications
You must be signed in to change notification settings - Fork 492
Description
Hi all,
First time contributor here.
We are in need of the grafana-agent supporting being run behind a HTTP_PROXY.
It is somewhat supported today but not fully.
I have done testing on metrics, traces and logs (with oauth2authentication), and here is what i found.
| Stream | Data | Oauth2 | Comment |
|---|---|---|---|
| logs | ✅ | ❌ | oauth2 works with v0.33.0 of prometheus/common |
| metrics | ✅ | ❌ | oauth2 works with v0.33.0 of prometheus/common |
| traces | ✅ | ✅ | Config file does not support proxy_url, but does pickup ENV HTTP_PROXY/HTTPS_PROXY when set |
Getting logs and metrics to work is easy, as it simply involves upgrading of a pkg.
Upgrading to v0.33.0 of prometheus/common, allows to specify proxy_url on oauth2: (both for logs and metrics)
(verified that it works)
metrics:
wal_directory: /tmp/grafana-agent/wal
global:
scrape_interval: 15s
remote_write:
- url: myurl.com
proxy_url: http://localhost:8888
oauth2:
client_id: ${CLIENT_ID}
client_secret: ${CLIENT_SECRET}
token_url: myurl.com
scopes: ["myscope"]
proxy_url: http://localhost:8888 <----
Now with traces, i have tried specifying proxy_url on remote_write and on remote_write/oauth2 which makes the agent blow up on startup (due to YAML parse error). Neither are supported it seems.
I also tried specifying the HTTP_PROXY as mentioned in the OTEL docs, but this doesn't work either.
All the above brings me to my points.
- Can anyone confirm that this is true
- If true, i would like to contribute to grafana-agent, making HTTP_PROXY support better. How would i get started?