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).

FieldMeaning
name, modeJob name and mode
sched_kind, sched_expr, tzSchedule definition and time zone (default UTC)
grace_msHow late a heartbeat may be
max_dur_msOptional longest run time
severityAlert severity
serviceOptional service tag
start_q, ok_q, fail_qOptional 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:

sh
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 as ok. Valid kinds are start, ok, fail; anything else is 404.
  • The token can also be passed as the t query 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)