About heartbeat checks
Heartbeat
A heartbeat check watches a scheduled job, such as a nightly backup or a queue worker's housekeeping. Alopex does not probe anything. Your job calls a ping URL each time it finishes. If a ping does not arrive when it should, Alopex opens an incident and alerts you.
This catches the failure that nobody sees: a job that has quietly stopped running. Alopex sees the pings, not the job. A ping tells you that something called the URL, so call it at the end of the job and only when the job succeeded. A job that runs and fails, then pings anyway, looks healthy.
To set one up, follow Add a heartbeat. The fields are listed in Heartbeat check settings.
How a ping is judged
Each heartbeat has two settings, Expected every (minutes) and Grace period (minutes). A ping is late once the expected interval plus the grace period has passed since the latest of these:
- the last ping, or the moment you created the heartbeat if it has never had one
- the last time you switched the heartbeat on
- the end of the most recent maintenance window that covered it
The time is counted from the ping that arrived, not from the job's scheduled time. With Expected every (minutes) at 60 and Grace period (minutes) at 5, a ping at 03:00 means the next one is due by 04:05. If your job's ping drifts later and later within a day, set the grace period to cover the drift.
Alopex looks for late pings every minute. As soon as one is late it opens an incident, with no count of failures in a row, because a missing ping cannot be a one-off glitch. The incident is headed Missed heartbeat, with the cause Heartbeat missed, and the alert goes out under the Goes down alert type. See My heartbeat was missed.
The next ping closes the incident and the alert that follows goes out under Recovers.
What a ping does
A ping is a plain GET or POST request to the heartbeat's URL. It needs no login, no cookies and no body. The long, random token in the URL is the only thing that identifies the heartbeat, so anyone who has the URL can send a ping for it. Treat it like a password. Only people who can edit the domain see it.
Alopex answers each request with a status:
| Answer | Meaning |
|---|---|
200 with OK | The ping was recorded. |
202 with Ignored | The URL is valid, but the heartbeat is paused, its domain is switched off, or the account is suspended. Nothing is recorded. |
404 | The URL does not match any heartbeat. Check the token. |
Alopex accepts up to 60 pings a minute for one URL and refuses the rest. Pinging once at the end of each run is all a heartbeat needs.
Pings are served from their own host, separate from the Alopex app.
Pausing and maintenance
To pause a heartbeat, open its More actions menu on the Checks tab and choose Pause. A paused heartbeat records no pings and opens no incident. Pausing closes any incident that is open, without sending a recovery alert. When you choose Resume, the clock starts again from that moment, so the heartbeat does not report the time it was paused as missed.
While a maintenance window covers a heartbeat, a late ping is excused rather than missed, and no incident is opened. Once the window ends, the clock starts again from the end of the window. An incident that was already open when the window began stays open. Maintenance windows are set up on the domain. See About maintenance windows and Schedule maintenance.
Plan limit
Your plan sets how many heartbeats you can have across your account. When you reach the limit, Add check shows how many your plan includes, with a link to upgrade. See Plans and limits for what each plan includes, and pricing for what it costs.