Alerts and dead-man jobs
Read alerts, define dead-man jobs and send start, ok and fail pings.
On this page
Alerts#
GET /api/v1/alerts lists alerts. GET /api/v1/alerts/{id}, /history and /evidence give detail, state history and the evidence for one alert. State changes are also queryable with source=alerts in CQL.
Dead-man jobs#
A job expects a heartbeat on a schedule and alerts when it is missing. Manage jobs with /api/v1/jobs (needs the jobs permission).
| Field | Meaning |
|---|---|
name, mode | Job name and mode |
sched_kind, sched_expr, tz | Schedule definition and time zone (default UTC) |
grace_ms | How late a heartbeat may be |
max_dur_ms | Optional longest run time |
severity | Alert severity |
service | Optional service tag |
start_q, ok_q, fail_q | Optional CQL queries that count as start, ok and fail |
Other job routes: GET /jobs/{name}/runs, /history, POST /jobs/{name}/rotate (new ping token, old ones revoked or kept for overlap_ms, at most 24 h) and POST /jobs/{name}/test-pattern.
Pings#
Your job calls the unauthenticated-by-session ping route with the job token:
curl -fsS -H "Authorization: Bearer <JOB_TOKEN>" http://127.0.0.1:8080/ping/nightly-backup/start
curl -fsS -H "Authorization: Bearer <JOB_TOKEN>" http://127.0.0.1:8080/ping/nightly-backup/ok
curl -fsS -H "Authorization: Bearer <JOB_TOKEN>" http://127.0.0.1:8080/ping/nightly-backup/fail/ping/{name}alone counts asok. Valid kinds arestart,ok,fail; anything else is404.- The token can also be passed as the
tquery parameter. - Failed lookups are rate limited per source network (
429). A repeated ping in the same slot answers{"dup": true}.
Report an inaccuracy (opens a support ticket in the portal; nothing is sent from this page)