https://github.com/benjojo/alertmanager-discord
Take your alertmanager alerts, into discord
https://github.com/benjojo/alertmanager-discord
alertmanager discord-bot
Last synced: 4 months ago
JSON representation
Take your alertmanager alerts, into discord
- Host: GitHub
- URL: https://github.com/benjojo/alertmanager-discord
- Owner: benjojo
- License: apache-2.0
- Created: 2018-03-28T17:08:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-03T18:47:19.000Z (over 2 years ago)
- Last Synced: 2025-12-18T23:07:09.965Z (7 months ago)
- Topics: alertmanager, discord-bot
- Language: Go
- Homepage:
- Size: 72.3 KB
- Stars: 186
- Watchers: 5
- Forks: 81
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
alertmanager-discord
===
Give this a webhook (with the DISCORD_WEBHOOK environment variable) and point it as a webhook on alertmanager, and it will post your alerts into a discord channel for you as they trigger:

## Warning
This program is not a replacement to alertmanager, it accepts webhooks from alertmanager, not prometheus.
The standard "dataflow" should be:
```
Prometheus -------------> alertmanager -------------------> alertmanager-discord
alerting: receivers:
alertmanagers: - name: 'discord_webhook' environment:
- static_configs: webhook_configs: - DISCORD_WEBHOOK=https://discordapp.com/api/we...
- targets: - url: 'http://localhost:9094'
- 127.0.0.1:9093
```
## Example alertmanager config:
```
global:
# The smarthost and SMTP sender used for mail notifications.
smtp_smarthost: 'localhost:25'
smtp_from: 'alertmanager@example.org'
smtp_auth_username: 'alertmanager'
smtp_auth_password: 'password'
# The directory from which notification templates are read.
templates:
- '/etc/alertmanager/template/*.tmpl'
# The root route on which each incoming alert enters.
route:
group_by: ['alertname']
group_wait: 20s
group_interval: 5m
repeat_interval: 3h
receiver: discord_webhook
receivers:
- name: 'discord_webhook'
webhook_configs:
- url: 'http://localhost:9094'
```
## Docker
If you run a fancy docker/k8s infra, you can find the docker hub repo here: https://hub.docker.com/r/benjojo/alertmanager-discord/