{"id":15062658,"url":"https://github.com/zt-sv/grafana-annotations-bot","last_synced_at":"2026-02-17T10:36:36.374Z","repository":{"id":36693460,"uuid":"176905238","full_name":"zt-sv/grafana-annotations-bot","owner":"zt-sv","description":"Telegram Bot for Grafana's Annotations","archived":false,"fork":false,"pushed_at":"2024-05-24T15:33:05.000Z","size":126,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-20T08:37:09.157Z","etag":null,"topics":["boltdb","bot","grafana","grafana-annotations","monitoring","telegram","telegram-bot"],"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/zt-sv.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-03-21T08:48:45.000Z","updated_at":"2024-05-24T15:23:53.000Z","dependencies_parsed_at":"2024-06-19T03:22:26.482Z","dependency_job_id":null,"html_url":"https://github.com/zt-sv/grafana-annotations-bot","commit_stats":null,"previous_names":["zt-sv/grafana-annotations-bot","13rentgen/grafana-annotations-bot"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/zt-sv/grafana-annotations-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt-sv%2Fgrafana-annotations-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt-sv%2Fgrafana-annotations-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt-sv%2Fgrafana-annotations-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt-sv%2Fgrafana-annotations-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zt-sv","download_url":"https://codeload.github.com/zt-sv/grafana-annotations-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt-sv%2Fgrafana-annotations-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29540189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T08:11:05.436Z","status":"ssl_error","status_checked_at":"2026-02-17T08:09:38.860Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["boltdb","bot","grafana","grafana-annotations","monitoring","telegram","telegram-bot"],"created_at":"2024-09-24T23:44:19.353Z","updated_at":"2026-02-17T10:36:36.352Z","avatar_url":"https://github.com/zt-sv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Telegram Bot for Grafana's Annotations\n---\nThis is the [Grafana annotations](http://docs.grafana.org/http_api/annotations/) Telegram bot that notifies you when new\nannotations will be added to Grafana.\n\n## Commands\n\n###### /start tagName,anotherOneTag\n\n```\nYou're successfully subscribed for tags:\ntagName anotherOneTag\n```\n\n###### /stop\n\n```\nYou're successfully unsubscribe for tags: [tagName anotherOneTag]\n```\n\n###### /status\n\n```\nGrafana\nVersion: 5.4.2\nDatabase: ok\n\nTelegram Bot\nVersion: v2.1.0\nBuild date: 2024-05-24T15:14:46Z\nGo version: go1.21.6\nUptime: Fri, 24 May 2024 15:15:40 UTC\n```\n\n## Installation\n\n### Docker\n\n`docker pull docker.io/z7sv/grafana-annotations-bot:latest`\n\n#### Bolt Storage\n\n```bash\ndocker run -d \\\n\t-e 'GRAFANA_URL=http://grafana:3000' \\\n\t-e 'GRAFANA_TOKEN=XXX' \\\n\t-e 'STORE=bolt' \\\n    -e 'BOLT_PATH=/data/bot.db' \\\n\t-e 'TELEGRAM_ADMIN=1234567' \\\n\t-e 'TELEGRAM_TOKEN=XXX' \\\n\t-e 'TEMPLATE_PATH=/templates/default.tmpl' \\\n\t-v '/data/grafana-annotations-bot:/data' \\\n\t-v '${PWD}/default.tmpl:/templates/default.tmpl' \\\n\t--name grafana-annotations-bot \\\n\tdocker.io/z7sv/grafana-annotations-bot:latest\n```\n\n#### ETCD Storage\n\n```bash\ndocker run -d \\\n\t-e 'GRAFANA_URL=http://grafana:3000' \\\n\t-e 'GRAFANA_TOKEN=XXX' \\\n\t-e 'STORE=etcd' \\\n\t-e 'ETCD_ENDPOINTS=localhost:2379' \\\n\t-e 'ETCD_TLS_INSECURE=true' \\\n\t-e 'TELEGRAM_ADMIN=1234567' \\\n\t-e 'TELEGRAM_TOKEN=XXX' \\\n\t-e 'TEMPLATE_PATH=/templates/default.tmpl' \\\n\t-v '/data/grafana-annotations-bot:/data' \\\n\t-v '${PWD}/default.tmpl:/templates/default.tmpl' \\\n\t--name grafana-annotations-bot \\\n\tdocker.io/z7sv/grafana-annotations-bot:latest\n```\n\n### Build from source\n\n`go get github.com/zt-sv/grafana-annotations-bot`\n\n### Configuration\n\n| Flag                             | ENV                              | Required | Default                | Description                                                                                             |\n|----------------------------------|----------------------------------|----------|------------------------|---------------------------------------------------------------------------------------------------------|\n| --grafana.url                    | GRAFANA_URL                      | True     |                        | The URL that's used to connect to the Grafana, example: `http://localhost:3000`                         |\n| --grafana.token                  | GRAFANA_TOKEN                    | True     |                        | The Bearer token used to connect with Grafana API                                                       |\n| --grafana.scrapeInterval         | GRAFANA_SCRAPE_INTERVAL          | False    | `10s`                  | Scrape annotations interval                                                                             |\n| --grafana.tls.insecure           | GRAFANA_TLS_INSECURE             | False    | `false`                | Insecure connection to Grafana API                                                                      |\n| --grafana.tls.insecureSkipVerify | GRAFANA_TLS_INSECURE_SKIP_VERIFY | False    | `false`                | Grafana TLS config - insecure skip verify                                                               |\n| --grafana.tls.cert               | GRAFANA_TLS_CERT                 | False    |                        | Grafana TLS config - client cert file path                                                              |\n| --grafana.tls.key                | GRAFANA_TLS_KEY                  | False    |                        | Grafana TLS config - client key file path                                                               |\n| --store.type                     | STORE_TYPE                       | False    | `bolt`                 | The store to use. Possible values: `bolt`, `etcd`                                                       |\n| --store.keyPrefix                | STORE_KEY_PREFIX                 | False    | `annotationsbot/chats` | Prefix for store keys                                                                                   |\n| --bolt.path                      | BOLT_PATH                        | False    | `/tmp/bot.db`          | Bolt database file path                                                                                 |\n| --etcd.endpoints                 | ETCD_ENDPOINTS                   | False    | `localhost:2379`       | The endpoints that's used to connect to the etcd store                                                  |\n| --etcd.tls.insecure              | ETCD_TLS_INSECURE                | False    | `false`                | Insecure connection to ETCD                                                                             |\n| --etcd.tls.insecureSkipVerify    | ETCD_TLS_INSECURE_SKIP_VERIFY    | False    | `false`                | ETCD TLS config - insecure skip verify                                                                  |\n| --etcd.tls.cert                  | ETCD_TLS_CERT                    | False    |                        | ETCD TLS config - client cert file path                                                                 |\n| --etcd.tls.key                   | ETCD_TLS_KEY                     | False    |                        | ETCD TLS config - client key file path                                                                  |\n| --etcd.tls.ca                    | ETCD_TLS_CA                      | False    |                        | ETCD TLS config - CA file path                                                                          |\n| --log.json                       | LOG_JSON                         | False    | `false`                | Tell the application to log json, default: false                                                        |\n| --log.level                      | LOG_LEVEL                        | False    | `info`                 | The log level to use for filtering logs, possible values: debug, info, warn, error                      |\n| --telegram.token                 | TELEGRAM_TOKEN                   | True     |                        | The token used to connect with Telegram. Token you get from [@botfather](https://telegram.me/botfather) |\n| --template.path                  | TEMPLATE_PATH                    | True     |                        | The path to the template                                                                                |\n| --telegram.admin                 | TELEGRAM_ADMIN                   | True     |                        | Telegram admin IDs                                                                                      |\n\n#### Authentication\n\nUsers may be allowed to command the bot specifies by multiply `--telegram.admin` command line option.\n\nExample:\n\n```bash\ngrafana-annotations-bot --telegram.admin=123 --telegram.admin=456\n```\n\nOr by specifying a newline-separated list of telegram user IDs in the TELEGRAM_ADMIN environment variable.\n\nExample:\n\n```bash\nTELEGRAM_ADMIN=\"123\\n456\" grafana-annotations-bot\n```\n\n#### Message template\n\nMessage template specifies by `--template.path` command line option or by TEMPLATE_PATH environment variable.\n[Default template](default.tmpl)\n\n##### Template variables\n\n| Go template variable | Type     | Description                                            |\n|----------------------|----------|--------------------------------------------------------|\n| {{.Title}}           | string   | Annotation title                                       |\n| {{.Message}}         | string   | Annotation message                                     |\n| {{.Tags}}            | []string | Annotation tags                                        |\n| {{.JoinedTags}}      | string   | Annotation tags joined to string by new line separator |\n| {{.FormattedDate}}   | string   | Annotation date in RFC1123 format                      |\n| {{.Text}}            | string   | Raw annotation body string                             |\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzt-sv%2Fgrafana-annotations-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzt-sv%2Fgrafana-annotations-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzt-sv%2Fgrafana-annotations-bot/lists"}