How checks work

On this page

A check is a promise about when pings will arrive. CronMissed keeps one deadline for each check, moves the check through five states as pings arrive or fail to, and sends one alert for each change between up and down.

Which states are there?

StateMeaningAlert
newNo ping yet. A new check has no deadline unless you turn on the first-ping deadline.None
upPings are arriving on time.A recovery alert when it returns from down
lateThe expected ping has not arrived and the grace time is running. The API calls this grace.None
downThe grace time ended, or the job reported a failure.One alert
pausedMonitoring is off.None

A started marker is separate from the state: it is set by a start signal and cleared by the finish of the same run.

How are deadlines computed?

  • Simple schedule: the check is late when the period has passed since the last success, and down after period plus grace.
  • Cron schedule: the check is late at the first scheduled moment after the last success, and down after grace. A ping that lands a little before its scheduled moment (up to 30 seconds, or a tenth of the gap on frequent schedules) counts for that moment, so a small clock difference never costs you a run.
  • A started run: the check is down at the earlier of its schedule deadline and the start plus the grace time.
  • A new check with the first-ping deadline on: down after one period plus grace measured from when the check became new.

All times are read from one clock, the database's, so a ping and the sweep that checks for late jobs never disagree about the time.

How do signals change the state?

SignalFrom newFrom upFrom down
Successup, no alertup, deadline movesup, recovery alert
Failuredown, alertdown, alertstays down, no new alert
Startstays new, run is timedrun is timedstays down, run is timed
Logrecorded, no changerecorded, no changerecorded, no change

When does the alert go out?

A sweep runs every minute and moves overdue checks to down, so a missed ping alerts within about two minutes of the moment the grace time ends. A failure signal alerts within seconds. A check that flips five or more times in 30 minutes is held, with one "flapping" notice, and released after 30 quiet minutes.

Try it on one job

Create a check, copy its ping URL into the job, and watch the first ping arrive.

Start monitoring