How It Works
- Create a heartbeat monitor with an expected interval
- Your service pings the monitor at regular intervals using your API key
- If we don’t receive a ping within the expected window, we alert you
Use Cases
- Cron jobs - Verify scheduled tasks complete
- Background workers - Monitor queue processors
- Batch jobs - Track ETL and data pipelines
- Internal services - Services behind firewalls
Creating a Heartbeat Monitor
- Dashboard
- CLI
- Go to Dashboard > Heartbeat
- Click Add Monitor
- Name your monitor and set the expected interval
- Copy the monitor ID
Authentication
Heartbeat endpoints require API key authentication via theX-API-Key header or Authorization: Bearer header. You can use either your organization’s API key or a scoped API key with the heartbeat:write scope.
Sending Heartbeats
Add a simple HTTP call to your job:- Bash
- Node.js
- Python
Status Values
Thestatus field in the request body supports:
| Value | Description |
|---|---|
up | Service is healthy (default if omitted) |
down | Service has failed |
degraded | Service is running but impaired |
Crontab Integration
Grace Periods
Allow some flexibility for job timing:| Setting | Description |
|---|---|
| Interval | How often heartbeats are expected |
| Grace period | Extra time before marking as late |
Reporting Failures
Report when jobs fail:Incident Safeguards
When a heartbeat is missed, the same incident safeguards apply as with uptime monitors:- Failure threshold (default: 2 for heartbeats) — must miss this many consecutive beats
- Cooldown — prevents rapid duplicate incidents
- Severity override (default: Minor for heartbeats) — configurable per monitor
- Draft mode and notification batching — configured at the organization level