discord: Send alerts and notifications to Discord

The discord() destination driver sends messages to Discord using Discord Webhook. For the list of available optional parameters, see Discord destination options.

Available in AxoSyslog version 3.33 and later.


   destination {

By default the message sending is throttled to 5 message/sec, see Discord: Rate Limits. To change this, use the throttle() option.

To use this destination, the scl.conf file must be included in your AxoSyslog configuration:

   @include "scl.conf"

The discord() driver is actually a reusable configuration snippet configured to send log messages using the http() driver. For details on using or writing such configuration snippets, see Reusing configuration blocks. You can find the source of this configuration snippet on GitHub.


To send messages to Discord, you must setup webhooks. For details, see: Discord: Intro to Webhooks.

Example: Using the discord() driver

The following example sends messages with custom avatar, and text-to-speech enabled.

   @include "scl.conf"
    destination d_discord {
            username("$HOST-bot") # Custom bot name, accepts macros
            tts(true) # Text-to-Speech message
            template("${MSG:-[empty message]}") # Message to send, can't be empty
Last modified December 4, 2023: Theme update (6377ea9)