Skip to main content

Overview

Zabbix is an open-source enterprise monitoring solution. Easyalert receives alerts from Zabbix via webhook media type, automatically creating incidents from trigger events.
This integration works with Zabbix 5.0+ which supports native webhook media types.

Requirements

  • Zabbix 5.0 or higher (for Webhook media type support)
  • Easyalert account and active tenant
  • Admin privileges in Zabbix

Setup Instructions

1

Create Integration in Easyalert

  1. Go to Integrations page from left menu
  2. Click Add Integration button
  3. Select Zabbix as Source Type
  4. Enter a name (e.g., Zabbix Production)
  5. Click Create to save
  6. Copy the generated Webhook URL
Example: https://api.easyalert.io/api/v1/webhooks/ingest/wh_abc123...
2

Create Media Type in Zabbix

Go to Administration → Media types → Create media type
FieldValue
NameEasyalert
TypeWebhook
3

Add Parameters

Click Add link to add each parameter one by one:
NameValue
URL{ALERT.SENDTO}
event_id{EVENT.ID}
trigger_id{TRIGGER.ID}
trigger_name{TRIGGER.NAME}
trigger_description{TRIGGER.DESCRIPTION}
trigger_severity{TRIGGER.SEVERITY}
trigger_status{TRIGGER.STATUS}
host_name{HOST.NAME}
host_ip{HOST.IP}
event_date{EVENT.DATE}
event_time{EVENT.TIME}
event_recovery_date{EVENT.RECOVERY.DATE}
event_recovery_time{EVENT.RECOVERY.TIME}
item_name{ITEM.NAME}
item_value{ITEM.VALUE}
event_tags{EVENT.TAGS}
host_tags{HOST.TAGS}
trigger_tags{TRIGGER.TAGS}
4

Add Webhook Script

Copy this script into the Script section:
var params = JSON.parse(value),
    req = new HttpRequest(),
    payload = {};

payload.event_id = params.event_id;
payload.trigger_id = params.trigger_id;
payload.trigger_name = params.trigger_name;
payload.trigger_description = params.trigger_description;
payload.trigger_severity = params.trigger_severity;
payload.trigger_status = params.trigger_status;
payload.host_name = params.host_name;
payload.host_ip = params.host_ip;
payload.event_date = params.event_date;
payload.event_time = params.event_time;
payload.event_recovery_date = params.event_recovery_date;
payload.event_recovery_time = params.event_recovery_time;
payload.item_name = params.item_name;
payload.item_value = params.item_value;

payload.tags = {};

function parseTags(tagString) {
    if (!tagString || tagString.length === 0) return;
    var pairs = tagString.split(',');
    for (var i = 0; i < pairs.length; i++) {
        var pair = pairs[i].trim();
        var c = pair.indexOf(':');
        if (c > 0) {
            payload.tags[pair.substring(0,c).trim()] = pair.substring(c+1).trim();
        }
    }
}

parseTags(params.host_tags);
parseTags(params.trigger_tags);
parseTags(params.event_tags);

req.addHeader('Content-Type: application/json');

var resp = req.post(params.URL, JSON.stringify(payload));

if (req.getStatus() !== 200 && req.getStatus() !== 202) {
    throw 'Response code: ' + req.getStatus() + ' Response: ' + resp;
}

return resp;
5

Add Message Templates (Required)

Switch to Message templates tab and add these two templates:Problem:
FieldValue
Message typeProblem
Subject{TRIGGER.NAME}
Message{EVENT.ID}
Problem Recovery:
FieldValue
Message typeProblem recovery
Subject{TRIGGER.NAME}
Message{EVENT.ID}
6

Configure Other Settings

FieldValue
Timeout30s
Process tagsChecked
EnabledChecked
7

Create Webhook User

Go to Administration → Users → Create user
FieldValue
AliasEasyalert-webhook
GroupsNo access to the frontend
PasswordAny password
Switch to Media tab and click Add:
FieldValue
TypeEasyalert
Send toYour copied Webhook URL
When active1-7,00:00-24:00
Use if severityCheck all
8

Create Action

Go to Configuration → Actions → Trigger actions → Create actionAction Tab:
FieldValue
NameSend to Easyalert
EnabledChecked
Operations Tab - Click Add:
FieldValue
Send to usersEasyalert-webhook
Send only toEasyalert
Recovery Operations: Add same settings for resolved alerts.

Field Mapping

Easyalert automatically maps Zabbix fields:
Zabbix FieldEasyalert Field
event_idEvent ID
trigger_nameTitle
trigger_descriptionDescription
trigger_statusStatus (PROBLEM → problem, OK → ok)
trigger_severitySeverity
host_nameHost
host_ipHost IP
item_nameService
event_tagsTags

Severity Mapping

Zabbix SeverityZabbix CodeEasyalert Severity
Disaster5critical
High4high
Average3warning
Warning2warning
Information1info
Not classified0info

Status Handling

Zabbix StatusEasyalert StatusAction
PROBLEMProblemCreates/updates incident
OKOKResolves incident
Recovery events (OK status) automatically resolve the corresponding incident.

Using Tags

Zabbix tags are used for routing in Easyalert.

Where to Define Tags

LocationMenu
HostConfiguration → Hosts → [Host] → Tags
TriggerConfiguration → Hosts → [Host] → Triggers → [Trigger] → Tags
TemplateConfiguration → Templates → [Template] → Tags

Example Tags

TagValueUsage
customerAcmeCorpCustomer-based routing
environmentproductionEnvironment-based routing
teambackendTeam-based routing

Usage in Easyalert

In Escalation Routing:
tags.customer equals AcmeCorp → Acme Policy
tags.environment equals production → Production Policy

Test

After completing Zabbix setup, you can test manually:
curl -X POST "YOUR_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "event_id": "12345",
    "trigger_id": "100",
    "trigger_name": "High CPU Usage",
    "trigger_description": "CPU usage exceeded 90%",
    "trigger_severity": "4",
    "trigger_status": "PROBLEM",
    "host_name": "web-server-01",
    "host_ip": "192.168.1.10",
    "event_date": "2024.12.03",
    "event_time": "10:30:00",
    "item_name": "CPU utilization",
    "item_value": "95%",
    "tags": {
      "customer": "AcmeCorp",
      "environment": "production"
    }
  }'

Troubleshooting

  1. Check if Media Type is active 2. Verify media is added to user 3. Check if Action is enabled 4. Review Zabbix action logs for errors
  1. Verify event_tags, host_tags, trigger_tags are in Parameters 2. Check if the script is complete 3. Ensure “Process tags” is checked in media type settings
  1. Check if Zabbix sends numeric (0-5) or text severity 2. Configure appropriate severity mapping 3. View webhook samples to see actual values
  1. Verify recovery operations are enabled in Zabbix action 2. Check the trigger_status field is included in payload 3. Ensure event_id matches between PROBLEM and OK events
  1. Check firewall/network settings 2. Verify Zabbix server can reach Easyalert API 3. Test connectivity with curl from Zabbix server
  1. Verify Webhook URL is correct 2. Check if integration is active in Easyalert 3. Regenerate webhook token if needed

Best Practices

Add tags in Zabbix for better routing and filtering in Easyalert. Tags like environment, team, and service help with escalation routing.
Add {TRIGGER.URL} parameter to help responders quickly navigate to Zabbix for more details.
Enable recovery operations to automatically resolve incidents when the problem clears.
Use Information or Warning severity triggers for initial testing to avoid unnecessary escalations.
Use Zabbix host groups to organize hosts and include group info in tags for routing.