Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maksim-paskal/telegram-gateway
Telegram gateway for Prometheus and Sentry
https://github.com/maksim-paskal/telegram-gateway
prometheus sentry telegram
Last synced: 5 days ago
JSON representation
Telegram gateway for Prometheus and Sentry
- Host: GitHub
- URL: https://github.com/maksim-paskal/telegram-gateway
- Owner: maksim-paskal
- License: apache-2.0
- Created: 2020-02-11T08:01:12.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-13T22:46:49.000Z (10 months ago)
- Last Synced: 2024-06-21T13:07:51.786Z (7 months ago)
- Topics: prometheus, sentry, telegram
- Language: Go
- Homepage:
- Size: 6.79 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Motivation
Prometheus and Sentry has no adapters for sending telegram messages for Ops peoples# Install in your kubernetes cluster
```
helm repo add paskal-dev https://maksim-paskal.github.io/helm/
helm install --namespace telegram-gateway paskal-dev/telegram-gateway
```# Prometheus configuration
add this block to your Prometheus installation (values.yaml)
```yaml
alertmanagerFiles:
alertmanager.yml:
route:
receiver: "prod-notify"
group_by: ['alertname']
group_wait: 15s
group_interval: 15s
repeat_interval: 15minhibit_rules:
- source_match:
severity: 'critical'
target_match_re:
severity: '^(warning|info|)$'
equal: ['alertname']receivers:
- name: "prod-notify"
webhook_configs:
- url: 'http://telegram-gateway.telegram-gateway.svc.cluster.local:9090/prom'
send_resolved: true
```# use curl to test sending messages
```
for curl messages. example:curl -sS -X GET localhost:9090/message --get \
--data-urlencode "test=value" \
--data-urlencode "test.empty=" \
--data-urlencode "url=https://test.com" \
--data-urlencode "msg=hello world" \
--data-urlencode "url.title=Open report".
```# how to create new telegram group with bot
* create new telegram group
* add youp telegram bot to new group
* create config with bot token
* start application with `-enableChatServer`
* in telegram group will be shown new `chatID` in new group