This code has been created by Zabbix (https://www.zabbix.com/integrations/discord) and has not been updated for newer Zabbix Server versions. I've simply adjusted their code to support the Discord API & Zabbix changes. I do not take/claim ownership of the contents found here.
For more information about the Zabbix project, visit their website (https://www.zabbix.com/).
- Login to your Zabbix Server.
- Create a Macro under Administration -> General -> Macros.
- Create one named "{$ZABBIX.URL}" containing the URL to your Zabbix Server.
- Direct to Configuration -> Actions, and enable the existing rule.
- Go to Administration -> Media Types -> Create
- Add the listed Paramaters & Values:
- Copy the contents of script.sh into the "script" field and apply.
- Once the media type is added, go to Administration -> Users -> Admin (your admin user) -> Media
- Add the newly created "Discord" media type, and edit the "send to" field with your Discord Webhook URL.
- All done! Enjoy Zabbix Discord Alerts.