Server Metrics Slack Notification Setup Using Zabbix

This document describes how to configure Slack notifications for server metrics using Zabbix, which is set up together with MediaHarbor.

Requirements

  • You must have permissions to create and add apps to your Slack workspace.

Accessing Zabbix

Access Zabbix on the server where you installed MediaHarbor at http://<server-ip>/zabbix.

  • Username: Admin
  • Password: Zabbix

alt text

1. Configuring Triggers

Open Inventory > Hosts > MediaHarbor server.

alt text

Open Triggers.

alt text

Click Create trigger.

alt text

Set the monitoring thresholds here.

Trigger Settings

  • You can set severity, threshold values, etc., as you prefer.

Example: Problem Expression

If the 5-minute average memory utilization exceeds 50%, it is considered a problem.

avg(/MediaHarbor server/vm.memory.utilization,5m) > 50

Example: Recovery Expression

If the 5-minute average memory utilization falls below 45%, it is considered recovered.

avg(/MediaHarbor server/vm.memory.utilization,5m) < 45

alt text

3. Creating a Slack App (Bot)

  1. Visit Slack API (https://api.slack.com/apps)
  2. Click “Create New App” > “From scratch”
  3. Choose an app name and select your workspace

alt text

  1. Go to OAuth & PermissionsBot Token Scopes and add:
    • chat:write
    • chat:write.public

alt text alt text

  1. Click Install App to Workspace or Reinstall App to Workspace
  2. Copy the Bot User OAuth Token (starts with xoxb-...)

Important: If the chat:write and chat:write.public permissions are not granted, notifications will fail with a missing_scope error.

4. Media Type Settings (Destination Settings)

Open Administration → Media types → Slack

alt text

  • bot_token: Set the Slack bot token you obtained, starting with xoxb-...
  • channel: #name-of-notification-channel

alt text

  • Enabled: Check this option

alt text

5. User Settings

Go to Administration → Users → Admin

alt text

Open the Media tab and add Slack.

alt text

  • Media type: Slack
  • Send to: Leave blank
  • Enabled: Check this option

alt text

6. Action Settings

Go to Configuration → Actions → Trigger Actions

Click Create Action

alt text

Set the action name and conditions.

Action Conditions

  • Select the trigger you created in the earlier steps

alt text

Operations

  • Open the Operations tab
  • Click the Add button under Operations
  • Add “Admin” to the “Send to users” field

alt text

Notification Test Steps

  1. Temporarily lower the trigger threshold to 1%
  2. Wait a few minutes
  3. Confirm that a notification appears in Slack
  4. Restore the threshold to its original value

Example Notification

alt text