Skip to main content

Zabbix v6 Slack Notifications

TST, Hong Kong

Preparing Slack

Start by creating a Channel for the Zabbix bot:

Slack Notifications

Now click to add a new app and click on the link in the top right that leads you to the App Directory that will open the Slack webpage inside your default browser. In the top right click on the Build tab and then on the big Start Building button.

Slack Notifications

Give your app a name and assign a workspace then click on Create App. In the following list select Bots:

Slack Notifications

There we need to assign a scope to your bot token. Click on Review Scopes to Add:

Slack Notifications

Add the chat.write scope and click on Install App to Workspace and give permission to your bot to access your workspace. You will now be given a token that you have to copy into the Zabbix interface so that Zabbix will be able to use the bot to send messages to your workspace:

Slack Notifications

Configure Zabbix

Open the Zabbix dashboard, enter the Media types configuration and select the Slack media type:

Slack Notifications

Copy your bot token in to the bot_token field and set the channel we want to bot to post into - click on Update to save your settings. Before using the Webhook, you need to setup the global macro {$ZABBIX.URL}, which must contain the URL to the Zabbix frontend - go to Administration / General / Macros:

Slack Notifications

Test the bot (the Test will complain about some undefined variables - you can fill them with dummy data:

Slack Notifications

Now the test runs successfully and you should receive the test message in #server_management:

Slack Notifications

Great! Now we can add the Slack notification as a Media Type inside our user notification settings:

Slack Notifications

Make sure that reporting problems to Zabbix Administrators is activated and you are good to go:

Slack Notifications