sreboxStart free
All guides

On-call

Send Zabbix and external alerts to SREbox On-call

Connect Zabbix or another webhook sender to SREbox On-call, route alerts through an escalation policy, and match recovery events to the incident they resolve.

Use an incoming alert integration when you want SREbox to handle paging but keep monitoring in Zabbix or another system. You do not need to create an SREbox service or send metrics. The sender makes an HTTPS request to SREbox; SREbox opens an incident and pages the rota selected for that integration.

Create an incoming integration

  1. Open On-call → Integrations and select Add integration.
  2. Give the source a name, such as Zabbix production.
  3. Select an enabled escalation policy with at least one rota tier. The first tier pages immediately; the policy's later tiers and any policy handoff rules still apply.
  4. Save the integration. Copy its endpoint and webhook key from the one-time confirmation. The key is a secret; SREbox stores only its digest and cannot show it again. If it is lost, rotate the key and update the sender. Rotation immediately invalidates the old key.

An integration can be paused while you make changes. The selected policy must remain enabled and have a usable rota tier for incoming events to be accepted.

Send the JSON payload

Send a POST request to the integration endpoint with the key in the Authorization: Bearer ... header (or the X-SREbox-Webhook-Key header). Do not put the key in the URL or request body. The JSON body can use these fields:

FieldRequiredMeaning
external_idYesStable ID used to match repeats and recovery.
titleYesShort incident title.
statusYesfiring or resolved. problem, triggered, alert, 1, ok, recovered, and 0 are also accepted.
severityNoinfo, low, medium, or high; defaults to high. Common Zabbix severity names and levels 0–5 are mapped automatically.
sourceNoHost, device, or monitoring system.
messageNoAdditional context for the responder.

Example firing event:

curl -X POST 'https://srebox.tech/api/oncall/incoming/INTEGRATION-ID/' -H 'Authorization: Bearer WEBHOOK-KEY' -H 'Content-Type: application/json' \\
  -d '{"external_id":"db-01-connection","title":"Database unavailable","status":"firing","severity":"high","source":"db-01","message":"Connection checks failed"}'

Use the Test payload shown after creating the integration for a ready-to-run command with its real endpoint and key. Replace the example external_id with an identifier unique to that alert condition.

Keep firing and recovery events together

The external ID is the deduplication key. Repeated firing requests with the same ID update the current incident without opening another incident or sending a new first-tier page. A recovery request with the same ID resolves that incident and cancels pending pages. If that alert fires again after recovery, SREbox opens a new incident.

Example recovery for the event above:

curl -X POST 'https://srebox.tech/api/oncall/incoming/INTEGRATION-ID/' -H 'Authorization: Bearer WEBHOOK-KEY' -H 'Content-Type: application/json' \\
  -d '{"external_id":"db-01-connection","title":"Database unavailable","status":"resolved","source":"db-01"}'

Make sure both problem and recovery actions send the same external ID. If the monitoring system generates a different event ID for recovery, use its stable problem or trigger ID instead. For example, Zabbix recovery messages include {EVENT.ID} for the problem and a separate {EVENT.RECOVERY.ID} for the recovery event; use {EVENT.ID} as the integration's stable ID. The script checks {EVENT.RECOVERY.VALUE} (0 when recovered) so the recovery operation is sent as resolved even though {EVENT.VALUE} describes the original problem.

Connect Zabbix

Zabbix's webhook media type can POST an authenticated JSON payload to SREbox. In Zabbix, open Alerts → Media types → Create media type, choose Webhook, add the parameters below, and paste the script in the Script field. The URL and key are specific to the SREbox integration. Keep the key in a protected Zabbix configuration field and do not include it in action messages.

ParameterValue
URLThe integration endpoint shown in SREbox.
TokenThe integration's webhook key.
EventID{EVENT.ID}
Title{EVENT.NAME}
Status{EVENT.VALUE}
RecoveryValue{EVENT.RECOVERY.VALUE}
Severity{EVENT.SEVERITY}
Source{HOST.NAME}
Message{EVENT.OPDATA}
var params = JSON.parse(value);
var req = new HttpRequest();
req.addHeader('Content-Type: application/json');
req.addHeader('Authorization: Bearer ' + params.Token);

var payload = {
    external_id: params.EventID,
    title: params.Title,
    status: params.RecoveryValue === '0' || params.Status === '0' ? 'resolved' : 'firing',
    severity: params.Severity,
    source: params.Source,
    message: params.Message
};

var response = req.post(params.URL, JSON.stringify(payload));
var status = req.getStatus();
if (status < 200 || status >= 300) {
    throw 'SREbox returned HTTP ' + status + ': ' + response;
}
return response;

After creating the media type, assign it as media to a Zabbix user, then add that user to the problem and recovery operations of the relevant alert action. Configure recovery notifications to run when Zabbix recovers the problem; the {EVENT.ID} value keeps the recovery linked to the original problem. Test both problem and recovery operations with a controlled event and confirm the incident timeline under On-call → Incidents.

Blanket-send every Zabbix trigger alert

To route every trigger problem and recovery through this integration, create one Trigger action and leave its Conditions list empty. Zabbix runs an action with no conditions for every event of that action type. In its Operations, send a message to the Zabbix user that has this webhook media type configured; add the corresponding Recovery operation so SREbox also receives recoveries. The selected SREbox escalation policy will handle each event sent to the endpoint.

This includes every trigger alert in the action scope and can create a lot of pages. To limit it, add conditions such as a host group, host, or severity. This trigger action does not cover Zabbix service, discovery, autoregistration, or internal events; create separate actions for those event sources if you need them.

For Zabbix's webhook setup and supported notification macros, see the Zabbix webhook media type guide and Zabbix notification macros.

Check delivery and troubleshoot

  • No incident appears: confirm the integration is enabled, its key has not been rotated, the request uses POST, and the JSON contains external_id, title, and a recognised status.
  • HTTP 404: the integration is missing, paused, or the key is incorrect. SREbox intentionally gives the same response for each case.
  • HTTP 409: the selected escalation policy is unavailable. Enable it and ensure it has a usable rota tier.
  • HTTP 413: keep the JSON body under 64 KB.
  • Recovery did not close the incident: check that recovery used the exact same external ID as the firing event and sent resolved, ok, recovered, or 0.
  • No responder was reached: check rota coverage, each tier's contact methods, provider configuration, and remaining SMS or call allowance under Billing.

The integration card shows when it last received an event. The incident timeline identifies the external integration and event ID. Use On-call → Incidents to review pages, acknowledgements, recovery, and escalation history.

For alerts generated inside SREbox, see set up your first alert. For rota and policy setup, see set up your first escalation policy.