Skip to content

This is very very simple bot for DISCORD and Prometheus Alertmanager.

Notifications You must be signed in to change notification settings

devrandom0/discord_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alertmanager Discord Bot

Introduction

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.

Requirements

It depends on just requests. And you need webhook address of discord.

Discord Webhook

  1. When you Discord opened, you can create channel or use general channel. Click on Edit Channel Edit Channel
  2. Click on Webhooks Webhooks
  3. Click on Create Webhook Create webhook
  4. Write a name for your webhook, you can upload image, Click on Copy in front of webhook address, then click on Save to finish
    Create webhook
  5. Now you have your webhook url and you can use it apps

Usage

Docker

docker run \
    --name discord_not \
    -it \
    -p 127.0.0.1:9481:9481 \
    -e URL='YOUR-WEBHOOK-ADDRESS' \
    moghaddas/discord_bot:latest

Simple

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>

About

This is very very simple bot for DISCORD and Prometheus Alertmanager.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published