{"id":20788748,"url":"https://github.com/maslick/grafana-telegram-proxy","last_synced_at":"2025-04-09T18:08:41.315Z","repository":{"id":73725899,"uuid":"225212108","full_name":"maslick/grafana-telegram-proxy","owner":"maslick","description":"sending Grafana alarm messages to Telegram via the Webhook channel","archived":false,"fork":false,"pushed_at":"2019-12-01T23:57:23.000Z","size":325,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T18:49:36.303Z","etag":null,"topics":["alarm","docker","go","golang","grafana","kubernetes","proxy","telegram","webhook"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maslick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-01T18:54:30.000Z","updated_at":"2023-03-06T19:58:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"9dca488c-9a04-47d7-a5f5-62dcef230ac0","html_url":"https://github.com/maslick/grafana-telegram-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maslick%2Fgrafana-telegram-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maslick%2Fgrafana-telegram-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maslick%2Fgrafana-telegram-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maslick%2Fgrafana-telegram-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maslick","download_url":"https://codeload.github.com/maslick/grafana-telegram-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248084332,"owners_count":21045125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alarm","docker","go","golang","grafana","kubernetes","proxy","telegram","webhook"],"created_at":"2024-11-17T15:16:16.944Z","updated_at":"2025-04-09T18:08:41.293Z","avatar_url":"https://github.com/maslick.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# =grafana-telegram-proxy=\nsending Grafana alarm messages to Telegram via the Webhook channel\n\n[![Build Status](https://api.travis-ci.org/maslick/grafana-telegram-proxy.svg)](https://travis-ci.org/maslick/grafana-telegram-proxy)\n[![Dockerhub](https://img.shields.io/badge/image%20size-2.5MB-blue.svg)](https://hub.docker.com/r/maslick/grafana-telegram-proxy)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\n\n## Motivation\nSending Alert notifications via Teleram fails when Grafana instance runs on a server without direct access to Telegram API (e.g. Russian ISPs block Telegram servers). One way to solve this is to leverage the webhook notification channel and run an HTTP proxy that listens to Grafana webhooks, parses the payload and sends the notifications to Telegram API from a DMZ (or better say ``de-Russia-nized zone`` - any cloud provider, i.e. Heroku, GAE, EC2, foreign VPS, baremetal, etc.)\n\n\n## Features\n* Grafana alert notifications to Telegram via the webhook notification channel\n* Lightweight static binary: ~2.5 MB zipped\n* Cloud-native friendly: Docker + k8s\n* Secure: Basic authentication (optional)\n\n![Grafana](screenshot.png)\n\n## Installation\n```zsh\n$ go test\n$ go build -ldflags=\"-s -w\"\n$ go build -ldflags=\"-s -w\" \u0026\u0026 upx grafana-telegram-proxy\n```\n\n## Usage\n* Without authentication:\n```zsh\n$ export BOT_TOKEN=1234567890abcdef\n$ export CHAT_ID=-12345\n$ ./grafana-telegram-proxy\nStarting server on port 8080 ...\n```\n\n* With Basic authentication:\n```zsh\n$ export BOT_TOKEN=1234567890abcdef\n$ export CHAT_ID=-12345\n$ export USERNAME=maslick\n$ export PASSWORD=12345\n$ export PORT=4000\n$ ./grafana-telegram-proxy\nStarting server on port 4000 ...\n```\n\n## Docker\n```zsh\n$ docker build -t maslick/grafana-telegram-proxy .\n$ docker run -d \\\n   -e BOT_TOKEN=1234567890abcdef \\\n   -e CHAT_ID=-12345 \\\n   -p 8081:8080 \\\n   maslick/grafana-telegram-proxy\n\n$ docker run -d \\\n   -e BOT_TOKEN=1234567890abcdef \\\n   -e CHAT_ID=-12345 \\\n   -e USERNAME=maslick \\\n   -e PASSWORD=12345 \\\n   -p 8082:8080 \\\n   maslick/grafana-telegram-proxy\n```\n\n## Kubernetes\n```zsh\n$ kubectl apply -f k8s\n$ kubectl set env deploy grafana-telegram-proxy \\\n   BOT_TOKEN=1234567890abcdef \\\n   CHAT_ID=-12345 \\\n   USERNAME=maslick \\\n   PASSWORD=12345\n```\n\n## Heroku\n```zsh\n$ git clone https://github.com/maslick/grafana-telegram-proxy.git\n$ cd grafana-telegram-proxy\n\n$ export HEROKU_APP_NAME=hello-world-app\n$ heroku login\n$ heroku create $HEROKU_APP_NAME\n$ git push heroku master\n$ heroku config:set BOT_TOKEN=$BOT_TOKEN\n$ heroku config:set CHAT_ID=$CHAT_ID\n$ heroku config:set USERNAME=$USERNAME\n$ heroku config:set PASSWORD=$PASSWORD\n$ open https://$HEROKU_APP_NAME.herokuapp.com/health\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaslick%2Fgrafana-telegram-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaslick%2Fgrafana-telegram-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaslick%2Fgrafana-telegram-proxy/lists"}