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.
Edit Channel

Webhooks

Create Webhook

Copy in front of webhook address, then click on Save to finish
docker run \
--name discord_not \
-it \
-p 127.0.0.1:9481:9481 \
-e URL='YOUR-WEBHOOK-ADDRESS' \
moghaddas/discord_bot:latest
git 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>
Content type
Image
Digest
Size
37.1 MB
Last updated
over 6 years ago
docker pull moghaddas/discord_bot