This is very very simple bot for DISCORD and Prometheus Alertmanager.
We had some issues about network connectivity, so we developep a simple app to send prometheus alertmanager alerts to discord.
This script in development... if you can or you want, help us to finish it. Thanks.
It depends on just requests. And you need webhook address of discord.
- When you Discord opened, you can create channel or use general channel. Click on
Edit Channel
- Click on
Webhooks
- Click on
Create Webhook
- Write a name for your webhook, you can upload image, Click on
Copyin front of webhook address, then click onSaveto finish

- Now you have your webhook url and you can use it apps
docker run \
--name discord_not \
-it \
-p 127.0.0.1:9481:9481 \
-e URL='YOUR-WEBHOOK-ADDRESS' \
moghaddas/discord_bot:latestgit clone https://github.com/sinamoghaddas/discord_bot
cd discord_bot
pip install -r requirements.txt
./discord_bot.py -h :(
usage: discord_bot.py [-h] -U URL [-H HOST] [-p PORT] [-u USER]
optional arguments:
-h, --help show this help message and exit
-U URL, --url URL webhook url
-H HOST, --host HOST listen address (default 0.0.0.0)
-p PORT, --port PORT listen port (default 9481)
-u USER, --user USER user in discord (default Discord-Bot)
./discord_bot.py -U <YOUR-WEBHOOK-ADDRESS>