Skip to content

This posts the superhooks event data as an embed to a discord channel, using a webhook

License

Notifications You must be signed in to change notification settings

seanbreckenridge/superhooks

 
 

Repository files navigation

Superhooks (discord)

This is modified from superhooks

This posts the superhooks event data as an embed to a discord channel, using a webhook.

Run this with python3.6 or above. don't be a monster.

Installation

pip install git+https://github.com/seanbreckenridge/superhooks

Create a webhook for a discord channel, and store the webhook URL in a file (just on the first line, nothing fancy) somewhere on the system.

An [eventlistener:x] section must be placed in supervisord.conf in order for superhooks-discord to do its work. See the “Events” chapter in the Supervisor manual for more information about event listeners.

Assumes superhooks-discord is on your $PATH:

[eventlistener:superhooks-discord]
command=superhooks-discord -f "/home/user/.discord_webhook.txt" -e BACKOFF,FATAL,EXITED,UNKNOWN
events=PROCESS_STATE,TICK_60
#buffer_size=25

Usage

Usage: superhooks-discord [options]

Options:
  -h, --help            show this help message and exit
  -f FILE, --file=FILE  File which contains discord web hook.
  -e EVENTS, --events=EVENTS
                        Supervisor event(s). Can be any, some or all of
                        ('STARTING', 'RUNNING', 'BACKOFF', 'STOPPING',
                        'FATAL', 'EXITED', 'STOPPED', 'UNKNOWN') as comma
                        separated values

Notes

  • All the events will be buffered for 1 min and pushed to web hooks.

About

This posts the superhooks event data as an embed to a discord channel, using a webhook

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Python 100.0%