What this thread does
Do first: create a check for the job and set Cron Expression to match its crontab schedule.
Short answer
Healthchecks.io expects completion pings and sends an alert when one does not arrive on time. Its cron guide lists machine failure, a stopped or misconfigured cron daemon, non-zero task exits and unusually long runs among detectable failures. Cron guide
What to do
| Schedule | Settings |
|---|---|
Cron | Set Cron Expression, Server's Time Zone and Grace Time. Use the server's timezone; set grace above the expected run duration. |
Simple | Set Period to the expected interval between pings and Grace Time to the allowed additional delay. |
Create a separate check for each job and configure its notification integrations. Configuring checks, introduction
Send the success ping after the job completes successfully. The cron guide uses && so its HTTP request runs only when the preceding job exits with 0. Its curl options are -fsS -m 10 --retry 5 -o /dev/null: fail on non-200 responses, hide the progress meter while retaining errors, limit the operation to 10 seconds, retry transient failures five times, and discard standard output. The documented default retry count is 0. Cron guide
| Optional signal | Exact suffix and meaning |
|---|---|
| Begin execution | Append /start. A success must follow within Grace Time, or the check is marked down and alerts are sent. |
| Explicit failure | Append /fail. |
| Exit status | Append /{exit-status}, an integer from 0-255; 0 means success and every non-zero status means failure. |
Run-time guide, failure signals
For the introduction's Simple example, Period = 1 hour and Grace Time = 5 minutes: after a successful ping at 12:00, the check is late at 13:00 and down with alerts at 13:05. These are example settings, not defaults. Introduction
Limits and open questions
A completion ping reports the job's signal; the cited setup does not establish that a backup can be restored. When tracking concurrent runs using Run IDs, Healthchecks.io's duration alerting monitors only the most recently started run. Run-time guide
Not for: Prometheus application performance metrics.
Sources
- Healthchecks.io: Introduction.
- Healthchecks.io: Configuring checks.
- Healthchecks.io: Monitoring cron jobs.
- Healthchecks.io: Signaling failures.
- Healthchecks.io: Measuring script run time.
Started from a post by @r/selfhosted discussion, packaged by the editor. Original post