Beamfar

What is heartbeat monitoring?

Heartbeat monitoring, also called a dead man’s switch, a check-in or push monitoring, reverses the direction of an uptime check. The monitor gives a job a unique URL; the job requests it on success; if no request arrives within the expected period plus a grace time, the monitor alerts.

Definition
Heartbeat monitoring
A monitor that expects a signal from a scheduled job within a time window and alerts when none arrives; also called a dead man’s switch.

Why it exists

Scheduled jobs fail by not happening, and a missing run leaves no error to catch. Backups, imports, report emails, subscription renewals and cache jobs are typical. A heartbeat also works for jobs the monitor cannot reach, such as those behind a firewall.

Setting it up

Choose the period (how often the job runs) and a grace time longer than the job’s normal run time and jitter. Send the signal only after the work has succeeded, for instance with job && curl .... Keep the URL secret and send alerts to a person.

A WordPress note

WP-Cron runs on page loads, not on a clock, so tasks on low-traffic sites can run late. A heartbeat shows the delay.

An example

At the end of a backup script: curl -fsS -m 10 --retry 3 https://monitor.example/hb/TOKEN. Many services also accept a start signal and a failure signal: the start records how long the run took, and the failure signal alerts at once instead of after the grace time. For a nightly job that takes about 10 minutes, a period of 24 hours and a grace time of 30 minutes means an alert half an hour after the expected time if nothing arrives.

What to check

That every important job has a heartbeat, that a missing signal reaches a person and that a restore, not only a run, is tested.

Sources

Read on . Standards and vendor pages change; confirm the current text before you rely on it.

Guides that use this term

  • Cron jobA cron job is a task scheduled to run at set times on a server. Why it fails silently, how WP-Cron differs from system cron and how to monitor it.
  • Uptime monitoringUptime monitoring requests a website from outside at intervals and alerts when it fails to answer. What it measures, what it misses and how it is confirmed.
  • Check intervalThe check interval is the time between two uptime checks. How it sets the detection delay, the number of checks and how it interacts with confirmation.

Know first. Know why. Tell your client before they call.

Paste your client list. Both regions start checking.

No card for the trial.