Inbound
The inbound URLs contain a secret tenant token. Owners and admins find them on the Team page and can rotate the token there. Rotating makes the old URLs stop working.
Prometheus Alertmanager
receivers:
- name: pager
webhook_configs:
- url: https://pager.example.com/api/ingest/<token>/alertmanager
send_resolved: true
Pager reads the status of every alert in the payload:
- firing: a new alert is created. If the same alert (Alertmanager fingerprint) is already open, it is refreshed: the refresh counter and the last-refresh time go up.
- resolved: the open alert is closed and the assignee is notified.
Updating and commenting from Prometheus
As in Opsgenie, a refresh can change the alert. Pager maps:
| Source | Alert field |
|---|---|
annotation summary (or message, else label alertname) | message |
annotation description | description |
label priority (P1–P5), else label severity | priority, see below |
annotation comment | adds a comment, only when the text changed |
Changes to message, description or priority show up in the activity log.
Priority mapping
The label priority wins if it is P1–P5 (or one of the words below). Otherwise the usual Prometheus label severity is mapped:
| severity | priority |
|---|---|
critical, crit, emergency, page, fatal | P1 |
error, high, major | P2 |
warning, warn, medium | P3 |
info, informational, low, minor, notice | P4 |
none, debug, ok | P5 |
Without either label the alert is P3. The generic webhook's priority field takes the same values.
- alert: HighCPU
expr: cpu > 0.9
labels:
priority: P2
annotations:
summary: CPU high on {{ $labels.instance }}
description: "{{ $value }} used"
comment: Runbook https://wiki.example.com/cpu
Generic webhook
curl -X POST https://pager.example.com/api/ingest/<token>/webhook \
-H 'Content-Type: application/json' \
-d '{"alias":"backup-job","message":"Backup failed","description":"exit 2","priority":"P2","status":"firing","comment":"see log","labels":{"host":"db1"}}'
alias is the de-duplication key (default: message). status is firing (default) or resolved. Sending the same alias again refreshes the alert.