Replies: 11 comments
-
what is wrong with using http_proxy? seems like a more standard approach than having custom config options |
Beta Was this translation helpful? Give feedback.
-
Most package management systems have some way of setting a proxy via config (yum, apt, npm, git, etc). While it's certainly possible for me to edit the init file by hand (or via automation) and to set environment variables, it creates extra (and un-documented) work for anyone who would want to use grafana.net for plugins. Without my manual edits, my logs were filling up with failure messages of 'checking for updates'. Long term, I'm going to have to do work to verify there's no changes to the init file on each release/update of grafana to ensure my edited copy that adds proxy settings hasn't deviated. While it seems simple enough to set my personal environment variables before using the CLI, if I had to do that each time I wanted to do git clone, I'd find another solution. In theory, I could set the proxy env vars in my bashrc, except I need to use sudo to actually install grafana-plugins, and our enterprise standard for sudo strips custom env vars. So then my option is to su to root, set the proxy settings in roots shell for all systems. Or, there could be an option in grafana.ini for 'http_proxy' that was used by grafana-server and grafana-cli. In the end, if you want to encourage usage of grafana.net especially among Enterprises, adding proxy support is like getting a surprise extra piece of bacon with breakfast. Is there a way to disable grafana-server from attempting to check grafana.net for plugins altogether? |
Beta Was this translation helpful? Give feedback.
-
you don't have to do that, you can modify the environments file placed where they usually are ( But if it's true that it is common for server tools to have a proxy config, then I am open for it. |
Beta Was this translation helpful? Give feedback.
-
Cool, the sysconfig/defaults route I like much better for grafana-server. Would still love to have an option for grafana-cli :) |
Beta Was this translation helpful? Give feedback.
-
You can try setting the proxy info in /etc/environment . Grafana-server is running as a different user. But yes, a config option would be great. I brought this up when the cloudwatch ds was implemented. I could work on integrating the go module that reads from ENV:http_(https,no)proxy; but probably won't be able to get to it till next week. https://golang.org/src/net/http/transport.go?s=7918:7975#L202 func ProxyFromEnvironment(req _Request) (_url.URL, error) |
Beta Was this translation helpful? Give feedback.
-
It's not possible to set this environment flag in Windows - so a command line paramter would be great!
Failed to send requesterrorGet https://grafana.net/api/plugins/repo/grafana-cloc |
Beta Was this translation helpful? Give feedback.
-
Is the http_proxy parameter for windows implemented in this push? |
Beta Was this translation helpful? Give feedback.
-
Is it already implemented? I'm struggling with Azure DS connection behind proxy (Windows). |
Beta Was this translation helpful? Give feedback.
-
Any news on this? I'm on Windows too and it doesnt work behind a proxy. The biggest trouble is that pushover Notification dont work either. |
Beta Was this translation helpful? Give feedback.
-
Any update on getting this implemented? It's been years... |
Beta Was this translation helpful? Give feedback.
-
Yes, please, add this support! |
Beta Was this translation helpful? Give feedback.
-
Grafana version: grafana-3.0.2-1463383025.x86_64
OS: Amazon Linux AMI release 2016.03
When installing Grafana3 on a system that requires using a HTTP proxy to reach the internet, Grafana is unable to reach grafana.net to check for plugins:
2016/05/16 18:15:08 [T] Failed to get plugins repo from grafana.net, Get https://grafana.net/api/plugins/versioncheck?slugIn=&grafanaVersion=3.0.2: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I was able to work around this by editing my init file adding this block to the 'start' section:
# Start Daemon
cd $GRAFANA_HOME
export http_proxy="http://myproxy:3128"
export https_proxy="http://myproxy:3128"
export no_proxy="127.0.0.1,localhost"
su -s /bin/sh -c "nohup ${DAEMON} ${DAEMON_OPTS} >> /dev/null 3>&1 &" $GRAFANA_USER 2> /dev/null
I was then experimenting with using grafana-cli for installing the clock plugin and ran into similar issue, had to set the proxy variables in my shell, then could do plugin install.
My preference would be that 'outbound' proxy could be set in grafana.ini, and that would be used by both grafana-server and grafana-cli.
Beta Was this translation helpful? Give feedback.
All reactions