Incident Ingest

Zabbix + Alert24 Integration: Auto-Create Incidents from Triggers

Use a Zabbix webhook media type to automatically open Alert24 incidents when triggers fire. Includes JavaScript webhook script and severity mapping.

Zabbix supports custom webhook media types that execute JavaScript to send notifications. This lets you POST directly to Alert24's incidents API without any external middleware.

Before you start

You'll need:

  • An Alert24 API key with write or incidents scope (Settings → API Keys)
  • Zabbix 5.0+ (webhook media types require Zabbix 4.4+)
  • Admin access to Zabbix

Create the webhook media type

  1. In Zabbix, go to Administration → Media types

  2. Click Create media type

  3. Set Name to Alert24

  4. Set Type to Webhook

  5. Add the following Parameters:

    Name Value
    alert24_api_key ak_live_YOUR_KEY
    event_id {EVENT.ID}
    trigger_name {TRIGGER.NAME}
    hostname {HOST.NAME}
    severity {TRIGGER.SEVERITY}
    status {EVENT.STATUS}
    message {ALERT.MESSAGE}
  6. Set the Script to:

var params = JSON.parse(value);
var severity_map = {
  'Disaster':     'critical',
  'High':         'high',
  'Average':      'medium',
  'Warning':      'high',
  'Information':  'info',
  'Not classified': 'medium'
};

var payload = {
  title: params.hostname + ': ' + params.trigger_name,
  description: params.message,
  severity: severity_map[params.severity] || 'medium',
  alias: 'zabbix-' + params.event_id,
  source: 'zabbix',
  tags: ['zabbix', params.hostname]
};

var req = new HttpRequest();
req.addHeader('Content-Type: application/json');
req.addHeader('Authorization: Bearer ' + params.alert24_api_key);

var response = req.post(
  'https://app.alert24.net/api/v1/incidents',
  JSON.stringify(payload)
);

if (req.getStatus() !== 200 && req.getStatus() !== 201) {
  throw 'Alert24 API error: ' + req.getStatus() + ' ' + response;
}

return 'Incident created: ' + response;
  1. Click Add to save

Create a user and assign the media type

  1. Go to Administration → Users
  2. Create a new user (e.g., alert24-notifier) or use an existing notification user
  3. Under Media, click Add and select the Alert24 media type
  4. Set Send to to any value (it's not used by the webhook but required by Zabbix)
  5. Save the user

Add to an action

  1. Go to Configuration → Actions → Trigger actions
  2. Create a new action or edit an existing one
  3. Under Operations, add an operation:
    • Operation type: Send message
    • Send to users: your alert24-notifier user
    • Send only to: Alert24
  4. Save the action

Tips

  • Deduplication: The alias uses {EVENT.ID} — Zabbix's stable event identifier. Alert24 deduplicates on this so re-notifications don't create duplicate incidents.
  • Recovery: To auto-resolve Alert24 incidents, add a Recovery operations step in the action that calls a second media type pointing to PUT /api/v1/incidents with status: resolved, using the same alias to find the incident.
  • Zabbix 6+: In Zabbix 6, the webhook script interface is the same but you can also use the built-in Zabbix webhook templates as a reference for how to structure the JavaScript.