Note: This is for very old version 8.5.1, BUT I noticed same behavior on newer versions!
In short: When running the binary standalone it does not pick the ENV proxy configurations.
I need to work with a standalone version (this is a must),
For this I downloaded the binary (ie: wget https://dl.grafana.com/enterprise/release/grafana-enterprise-8.5.1.linux-amd64.tar.gz
I edit the config/default.ini and I run it with no issues, with:
./bin/grafana-server --config /root/grafana-8.5.1/conf/defaults.ini
BUT although I have the proxy definition in /etc/environment and I can see using the env command that the proxy config is defined, the grafana process does not get the proxy config and it hence cannot connect to data sources.
When configuring a data source I get the error:
“Error reading Prometheus: Post “http://proxyIP:15877/cgi-bin/blockpage.cgi?ws-session=1060906826”: dial tcp proxyIP:15877: i/o timeout”
So, it is clear that it is trying to get to the proxy although I configured the IP of Prometheus. (Note: I tried with other data sources - Elasticsearch).
Can anyone advise please if this can be worked around somehow?