How to use proxy for Telegram notifications channel

Sending Alert notifications via Teleram fail when Grafana instance runs on a server without direct internet access.
And there is no obvious way to define http/https proxy for Telegram in channel configuration form or ini file.

Setting proxy globally for grafana in env doesn’t look as a good solution - as far as I understand it would also cause all http-based datasource communication go through proxy too.

Is there any way around this problem?

1 Like

Hi,

At the moment you cannot configure this for telegram. You have to go with configure proxy globally for grafana in env variables. See this and this issue for details.

Marcus

Hi!
The situation has not changed in a year? Very topical topic - to drive all traffic through the proxy is not very convenient, you need only the alerts from the telegrams of the bot.

I’ve used these commands to start grafana so that it connects to local servers and also it sends telegram messages.

SET http_proxy=http://X.X.X.X:8000
SET http_proxy=http://X.X.X.X:8000
SET no_proxy="127.0.0.1,localhost"
D:\GRAFANA\bin\grafana-server.exe

hi turkertunali …
can u please explain with the commands on how to do that…my grafana is on dockers

That company gave us a proxy server. We just set it when grafana is starting.You need to set some environmental variables for Grafana, like.

SET http_proxy=http://PROXY_SERVER:8000
SET https_proxy=http://PROXY_SERVER:8000
SET no_proxy=“127.0.0.1,localhost”
D:\GRAFANA\bin\grafana-server.exe