#How to configure HTTP/HTTPS proxy in NAbox in order to download Grafana plugins ?
1 messages · Page 1 of 1 (latest)
Did you try HTTP_PROXY environment variable ?
This is exactly what I did.
When logged on Nabox through SSH with " admin " account, a printenv command line shows indeed this environment variable: HTTPS_PROXY=[IP address of the proxy]:port
Another command line seems to prove that it's working:
---> curl -v https://grafana.com
Below is the beginning of the answer:
On the contrary, with the GUI (still logged as " admin "), when I am hooving the mouse cursor over the button " All " on the plugins tab, it looks like it is somewhat greyed out and it says " This filter has been disabled because the Grafana server cannot access grafana.com "...
Any idea ?
I think the grafana container doesn't inherit the HTTPS_PROXY environment
You might have to edit /usr/local/nabox/docker-compose/docker-compose.override.yaml
Try :
services:
grafana:
environment:
- HTTPS_PROXY=<proxy>
Hello,
I modified my " /usr/local/nabox/docker-compose/docker-compose.override.yaml " file according to your advice.
Now, it looks like that:
Unfortunately, it does not work better through the GUI, even the SSH command line " curl -v https://grafana.com " returns a DNS error: Could not resolve host: grafana.com ...
---> I modified again the " /usr/local/nabox/docker-compose/docker-compose.override.yaml " and tried to call the proxy environment variable to " GF_HTTPS_PROXY " as all entries in this file start with GF_ ... Anyway, it does not change anything to the result...
---> The only way to have the " curl -v https://grafana.com " to work is to set the environment variable: HTTPS_PROXY=[IP address of the proxy]:port
Then DNS error disappears... However, I am still unable to download plugins through the GUI.
Did you restart the containers after the modification ? Were you able to check, from within the container that HTTPS_PROXY is set ?
There shouldn't be any difference between setting the override file's HTTPS_PROXY and doing it manually in the container, it does exactly the same thing.
What about installing the plugin with grafana cli once the proxy is set correctly ?
Yes Indeed, I restarted docker container but it does not improve the situation:
How to check from within the container if the proxy is set ?
Sorry, I am not a docker expert at all... 😉
I will of course install the plugin with Grafana CLI once I will be able to download it.
Thank you in advance.
« dc exec grafana bash » will drop you in the container and from there you should be able to use grafana cli to download and install the plugin
Thanks for the help, it did the trick !
However, I had again to set the environment variable HTTPS_PROXY=[IP address of the proxy]:port for the user " grafana " otherwise I got the same DNS error:
After that, I have been able to browse the list of remote plugins:
Have a nice day !
Excellent. Once you modified the override file, and dc exec grafana bash you should be able to see HTTPS_PROXY in the list when doing env command. From that point it shouldn't be necessary to set HTTPS_PROXY again.
When you say you set HTTPS_PROXY specifically "for the user grafana" what did you mean ?
Glad it's working anyway !
All right I think I got it.
When changing the override file, the container needs to be recreated, using dc up -d --force-recreate grafana instead of dc restart grafana. That's why you didn't have the environment defined
OK, I know that the features request must be huge but that would be great if in an upcoming release all that could be configurable through the GUI ! 😉
Thank you in advance.