Discord¶

Discord integration will create new messages when a DAG fails, and optionally update those messages when a DAG reruns/succeeds.
Setup¶
Create a new Discord application following the guide from the discord.py library.
Copy the bot token somewhere secure.
Configuration¶
token
: (Required) the bot token from abovechannel
: (Required) channel name to send messages tothreshold
: (Optional) Maximum alert threshold. Alerts with higher numerical priority (lower logical priority) will be ignoredupdate_message
: (Optional) Update a failure message with running/succeeds. Defaults tofalse
send_running
: (Optional) Send new messages when a DAG starts running. Defaults tofalse
send_success
: (Optional) Send new messages when a DAG succeeds. Defaults tofalse
failed_color
: (Optional) Color of a DAG failed messagerunning_color
: (Optional) Color of a DAG running message.success_color
: (Optional) Color of a DAG success message.channel_P1
: (Optional) P1 channel overridechannel_P2
: (Optional) P2 channel overridechannel_P3
: (Optional) P3 channel overridechannel_P4
: (Optional) P4 channel overridechannel_P5
: (Optional) P5 channel overridechannel_failed
: (Optional) Failed channel overridechannel_success
: (Optional) Success channel overridechannel_running
: (Optional) Running channel overridechannel_failed_P1
: (Optional) Failed P1 channel overridechannel_failed_P2
: (Optional) Failed P2 channel overridechannel_failed_P3
: (Optional) Failed P3 channel overridechannel_failed_P4
: (Optional) Failed P4 channel overridechannel_failed_P5
: (Optional) Failed P5 channel overridechannel_success_P1
: (Optional) Success P1 channel overridechannel_success_P2
: (Optional) Success P2 channel overridechannel_success_P3
: (Optional) Success P3 channel overridechannel_success_P4
: (Optional) Success P4 channel overridechannel_success_P5
: (Optional) Success P5 channel overridechannel_running_P1
: (Optional) Running P1 channel overridechannel_running_P2
: (Optional) Running P2 channel overridechannel_running_P3
: (Optional) Running P3 channel overridechannel_running_P4
: (Optional) Running P4 channel overridechannel_running_P5
: (Optional) Running P5 channel override
[priority.discord]
token = the bot's token
channel = the numerical channel ID, from the url or by right clicking
# Configure tag and priority specific channels
channel_P3 = ...
channel_failed_P1 = ...
Ensure your bot is invited into any private channels.
Verbose updates¶
By default, only DAG failure events will be sent. On rerun, failure messages can be updated to reflect running/success.
The plugin can also be configured to always send updates, including when a DAG starts running and/or succeeds. These can also be configured to send to different channels.
[priority.discord]
# Update messages to reflect current state
update_message = true
send_success = true
channel_success = a-different-channel
send_running = true
channel_running = a-different-channel
Customizing message colors¶
[priority.discord]
failed_color = "#FF0000"
running_color = "#FFFF00"
success_color = "#00FF00"