Skip to content

Heartbeat monitoring

Monitor cron jobs, queue workers and backups by having them ping a secret URL.

Updated

Create the monitor

Choose Heartbeat, set the expected interval (how often the job should report) and a grace period. The monitor page shows the secret URL to editors.

Signals

GET or POST https://your-host/api/heartbeat/<token> when the job succeeds. Append /start when it begins and /fail when it fails. Add ?duration=<ms>&exit=<code>&key=<run id> to record run time, exit code and make retries idempotent.

Evaluation

If no success or ping arrives within interval + grace, the monitor goes DOWN with cause heartbeat_missing and an incident opens after the failure threshold. A failure signal marks the monitor DOWN immediately; a success resolves it after the recovery threshold. Duplicate signals with the same key are accepted once.

Rotation

Rotate the URL from the monitor page if it leaks. The old URL stops working immediately.

Example

0 3 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 --retry 3 "https://your-host/api/heartbeat/hb_...?key=$(date +%s)" || curl -fsS -m 10 "https://your-host/api/heartbeat/hb_.../fail"