Zabbix → Notifly
Zabbix can do everything except one thing — reliably reach a human at night. Emails get lost, and an SMS gateway is yet another thing to maintain. Notifly accepts Zabbix events natively: one media type of the Webhook type — and problems arrive as push notifications with a priority based on the trigger severity, while recoveries arrive quietly.
You need Zabbix 6.0 or newer (on 5.x, replace HttpRequest with CurlHttpRequest).
Step 1. Channel and token
Section titled “Step 1. Channel and token”Create a channel in the admin panel, e.g. zabbix, and
copy its channel token (prefix A).
Step 2. Media type
Section titled “Step 2. Media type”Alerts → Media types → Create media type, type Webhook, name Notifly.
Parameters:
| Name | Value |
|---|---|
notifly_url | https://api.notifly.ru/integrations/zabbix |
notifly_token | {ALERT.SENDTO} |
subject | {ALERT.SUBJECT} |
message | {ALERT.MESSAGE} |
severity | {EVENT.NSEVERITY} |
status | {EVENT.VALUE} |
update | {EVENT.UPDATE.STATUS} |
event_id | {EVENT.ID} |
host | {HOST.NAME} |
trigger | {EVENT.NAME} |
trigger_id | {TRIGGER.ID} |
url | {$ZABBIX.URL}/tr_events.php?triggerid={TRIGGER.ID}&eventid={EVENT.ID} |
tags | {EVENT.TAGSJSON} |
Script:
var params = JSON.parse(value);var url = params.notifly_url, token = params.notifly_token;delete params.notifly_url;delete params.notifly_token;
var req = new HttpRequest();req.addHeader('Content-Type: application/json');req.addHeader('X-Notifly-Key: ' + token);
var resp = req.post(url, JSON.stringify(params));if (req.getStatus() < 200 || req.getStatus() >= 300) { throw 'Notifly: HTTP ' + req.getStatus() + ': ' + resp;}return 'OK';On the Message templates tab, add Problem, Problem recovery and
Problem update templates — the default ones are enough. Without templates Zabbix
won’t send anything (No message defined for media type). Set the {$ZABBIX.URL}
macro in Administration → Macros — then the notification includes a link to the
event.
Step 3. User and action
Section titled “Step 3. User and action”- Users → user → Media → Add: type
Notifly, Send to — the channel token. Different users can have tokens of different channels — the media type stays the same. - Alerts → Actions → Trigger actions: an operation that sends via
Notifly, plus recovery and update operations if you need them.
What arrives on your phone
Section titled “What arrives on your phone”| Zabbix event | Notifly priority |
|---|---|
| problem, Disaster | 10 |
| problem, High | 8 |
| problem, Average | 6 |
| problem, Warning | 5 |
| problem, Information | 3 |
| problem, Not classified | channel default priority |
| recovery | 2 (quiet) |
| update (ack, comment…) | 3 |
The title is {ALERT.SUBJECT}, the text is {ALERT.MESSAGE} plus a link to the event.
Details and all extras.zabbix fields are in the receiver documentation.
Escalation and night mode
Section titled “Escalation and night mode”- Turn on delivery in the channel settings: an unread Disaster after 5 minutes — a phone call, after 15 — an incident in PagerDuty or an alert in Opsgenie. Read the push — the re-sending stops.
- Quiet hours with a threshold of 8 let High and Disaster through at night, while Average and below arrive in the morning digest.
- For scheduled maintenance, create a
maintenance window on the
zabbixchannel — problems will arrive silently and without escalation.
Benefits
Section titled “Benefits”- No SMS gateway or scripts on the Zabbix server — just the standard media type.
- Priority by severity: Disaster is loud, Information is quiet, recovery doesn’t wake you.
- One media type for everyone: different users and groups get their own channels via Send to.
What to improve next
Section titled “What to improve next”- Split channels by environment (
zabbix-prod,zabbix-stage) and enable escalation only for production. - If you already have a media type from Zabbix’s official webhook templates, you can
adapt it by changing only the URL and the script: the receiver also understands their
parameter names (
alert_subject,event_nseverity,host_name…).