Zabbix Integration - Infrastructure Alerts
Connect Zabbix to Echobell with a webhook media type and get push notifications or phone calls when a trigger fires.
Zabbix is an open-source monitoring platform for networks, servers and applications. A webhook media type sends its alerts to an Echobell channel.
Create a Channel
Create a new channel in Echobell and copy the Webhook URL.
Create a Webhook Media Type
In Zabbix, go to Alerts → Media types → Create media type, set Type to Webhook, and name it "Echobell". Add these parameters:
| Name | Value |
|---|---|
url | {ALERT.SENDTO} |
title | {ALERT.SUBJECT} |
body | {ALERT.MESSAGE} |
host | {HOST.NAME} |
severity | {EVENT.SEVERITY} |
status | {EVENT.VALUE} |
Add the Script
Paste this into the Script field:
var params = JSON.parse(value),
req = new HttpRequest();
req.addHeader('Content-Type: application/json');
var response = req.post(params.url, JSON.stringify({
title: params.title,
body: params.body,
host: params.host,
severity: params.severity,
status: params.status
}));
if (req.getStatus() !== 200) {
throw 'Echobell returned HTTP ' + req.getStatus() + ': ' + response;
}
return 'OK';Assign the Media to a User
Go to Users → Users, open the user who should be alerted, and on the Media tab add an entry with Type Echobell and Send to set to your channel's webhook URL.
Create a Trigger Action
Go to Alerts → Actions → Trigger actions and add an action whose operation sends a message to that user through the Echobell media type.
Only Notify on Problems
Zabbix sends both problem and recovery events. {EVENT.VALUE} is 1 for a problem and 0 for a recovery, so set this channel condition to keep recoveries quiet:
status == "1"
Use a second channel with status == "0" if you want recovery notifications at a lower urgency.