Sobes.tech
Middle

How to properly configure the notification system in Zabbix?

sobes.tech AI

Answer from AI

You can configure the notification system in Zabbix as follows:

  1. Create media types.
    These are methods of delivering notifications (Email, Telegram, Slack, etc.).

    • Go to Administration → Media types.
    • Click Create media type.
    • Select the type, enter parameters (server, port for Email; token for Telegram/Slack).
  2. Create actions.
    They define which events (triggers) to respond to and what notifications to send.

    • Go to Configuration → Actions → Trigger actions.
    • Click Create action.
    • Set the action name (Action name).
    • Conditions tab:
      Define trigger conditions (e.g., server group, specific trigger, importance level). Conditions can be combined with AND/OR.
      Example condition:
      Trigger severity >= "Average"
    • Operations tab:
      Define what to do when triggered.
      Add steps (Steps), message sending (Send message to), and whom to notify (Send to Users/User groups).
      Specify the media type and message template used.
    • Recovery operations tab:
      Define actions upon trigger recovery.
    • Update operations tab:
      Define actions when the trigger is updated.
  3. Configure users.
    Specify contact information for each user.

    • Go to Administration → Users.
    • Select a user or click Create user.
    • Media tab:
      Click Add. Select the created media type. Enter address/ID (e.g., email address, Telegram Chat ID). Specify days and hours when notifications should be sent. Choose importance levels of triggers for which the user wants to receive notifications.
  4. Test notification sending.
    You can create a test trigger with a low update interval or use the Zabbix sender utility to generate a test event. Also, check the Zabbix server logs (zabbix_server.log) for notification attempts.

Example media type configuration (Email):

// Media type configuration for Email
Description: Email (SMTP)
Type: Email
SMTP server: smtp.yourcompany.com
SMTP server port: 587
SMTP helo: yourcompany.com
SMTP email: zabbix@yourcompany.com
Authentication: Username and password
Username: zabbix@yourcompany.com
Password: YourPassword
Enable: Enabled

Example action configuration for triggers of medium and higher importance:

// Action 'High and Average Severity Issues'
Name: High and Average Severity Issues
Conditions:
  (A) Trigger severity >= "Average"
Operations:
  Step 1-1:
    Operation type: Send message
    Send message to: User groups "Zabbix Admins"
    Send only to: Email
    Default message:
      Subject: Problem: {EVENT.NAME} on {HOST.NAME}
      Message:
        Problem started at {EVENT.DATE}/{EVENT.TIME} on {HOST.NAME}
        Problem name: {EVENT.NAME}
        Host: {HOST.NAME}
        Severity: {EVENT.SEVERITY}
        Operational data: {ITEM.VALUE1}, {ITEM.VALUE2}...
        Original event ID: {EVENT.ID}

Example user media configuration:

// User 'Admin' media configuration
User: Admin
Media type: Email (SMTP)
Send to: admin@yourcompany.com
When active: 1-7,00:00-24:00
Use if severity:
  (✓) Information
  (✓) Warning
  (✓) Average
  (✓) High
  (✓) Disaster
  ( ) Not classified
Status: Enabled

This approach provides a flexible and fault-tolerant notification system. It is important to regularly test the notification functionality and update user contact details.