Appearance
Zabbix
Send Zabbix alerts to Notifiq using a media type webhook.
Setup
1. Create a media type:
In Zabbix: Administration → Media types → Create media type
- Type:
Webhook - Script:
javascript
var req = new HttpRequest();
req.addHeader('Content-Type: application/json');
req.addHeader('Authorization: Bearer ' + value.token);
req.post(value.url + '/api/notify', JSON.stringify({
title: value.subject,
message: value.message,
level: value.severity
}));
return 'ok';- Parameters:
url— your Notifiq URLtoken— your API tokensubject—{TRIGGER.NAME} on {HOST.NAME}message—{TRIGGER.DESCRIPTION}severity— map Zabbix severity to Notifiq level (see below)
2. Map severity levels:
| Zabbix severity | Notifiq level |
|---|---|
| Not classified | info |
| Information | info |
| Warning | warning |
| Average | warning |
| High | error |
| Disaster | critical |
3. Assign media type to a user and configure Zabbix action to use it.
Rate limiting
Add your Zabbix server's IP to Settings → Security → Rate Limit Whitelist.