Heartbeat monitoring vs uptime monitoring
On this page
An uptime monitor asks your service whether it is alive. A heartbeat monitor waits for your job to say it ran. Use uptime checks for things that must answer requests, and heartbeats for things that must happen on a schedule.
Which failure does each one catch?
| Failure | Uptime monitor | Heartbeat monitor |
|---|---|---|
| Website or API stops answering | Yes | No |
| Nightly backup never starts | No | Yes |
| Cron daemon is stopped | No | Yes |
| Job starts and hangs forever | No | Yes, with a start ping |
| Scheduler disabled or deleted | No | Yes |
| Job fails with an error code | No | Yes, with an exit status ping |
| TLS certificate expires | Yes | No |
Why can an uptime monitor not watch a cron job?
A cron job usually has no address to call. If you give it one, calling it runs the job, which is not monitoring, or returns a status that says nothing about the last scheduled run. The only reliable evidence that a scheduled run happened is a message sent by the run itself.
Can one tool do both?
Many monitoring services offer both kinds. Whichever you use, pick the check type by the failure you fear. CronMissed does the heartbeat half and does it deeply: schedules in cron syntax, start and failure signals, run times and a log of every ping.
Questions and answers
- Most production systems do: uptime checks for what users call, and heartbeats for what must run without being called, such as backups, imports, billing runs and cleanups.
- Only indirectly, if the service pings from inside its own loop. For a service that must answer requests, an uptime monitor is the right tool.
Do I need both?
Can a heartbeat check a web service?
Create a check, add one curl to the job, and CronMissed alerts you when a ping is late or reports a failure.
Start monitoring