Browse documentation

Pharos / Docs / v0.5.10

Zabbix and Grafana

Updated 2026-09-08 ยท Pharos 0.5.10

Neither has a Pharos-specific integration; both use the API.

Zabbix: create a Webhook media type with parameters for the URL, token and component id, and attach it to an action.

var p = JSON.parse(value), req = new HttpRequest();
req.addHeader('Content-Type: application/json');
req.addHeader('Authorization: Bearer ' + p.pharos_token);

// event_value "1" = problem, "0" = recovery
var body = JSON.stringify({ status: p.event_value === '1' ? 4 : 1 });
return req.post(p.pharos_url + '/api/v1/components/' + p.component_id, body);

Grafana: its webhook posts Grafana's own alert JSON, which Pharos does not parse. Point the contact point at a small relay โ€” an n8n webhook node is enough โ€” and have the relay call the API. Map firing to 4 and resolved to 1. Going the other way, /api/v1/components needs no token, so the Infinity datasource can chart current status directly.