Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media/discord
Discord webhook
This guide describes how to integrate your Zabbix 4.4 installation with Discord using the Zabbix webhook feature. This guide will provide instructions on setting up a media type, a user and an action in Zabbix.
Setting up Discord Webhook
1. Go to https://discordapp.com/app or open Discord Desktop application. Select your server and channel where you want to get Zabbix notifications.
2. Press Edit channel, select Webhooks tab and press Create Webhook button
3. Setup your Discord webhook and press Save.
You can copy Discord webhook URL now or do it later with Edit button.
Setting up Zabbix Webhook
1. Before setting up Discord Webhook, you need to setup the global macro "{$ZABBIX.URL}", which must contain the URL to the Zabbix frontend.
The URL should be either an IP address, a fully qualified domain name or localhost. Protocol is is mandatory, port is optional.
Good examples:
http://zabbix.com
https://zabbix.lan/
http://localhost
http://127.0.0.1:8080
Bad examples:
zabbix.com
http://zabbix/
2. In the "Administration > Media types" section, import the media_discord.xml
3. You can also choose between two notification format. Open added Discord media and set _"use_defaultmessage" parameter:
- false (default)
- use preformatted Embed Object with predefined set of fields
- true
- use default message from Zabbix Action
4. To receive notifications in Discord, you need to create a Zabbix user and add Media with the Discord media type.
The "Send to" field must contain Discord webhook URL created before.
Also don’t forget that in order to send notifications, this user must have access to hosts that generated such problems
5. Got Alerts! You are awesome!
For more information see Zabbix and Discord documentations.
Supported Versions
Zabbix 4.4