Skip to content

Incidents and reminders

An incident starts when a monitor goes down and ends when it recovers. It is the unit that notifications follow.

When a monitor goes down, CronBeat opens an incident and queues one down notification per channel. While the incident is open, more failures or misses do not create more alerts.

If the incident stays open you get reminders:

  • the first one 1 hour after the incident opened,
  • then every 24 hours,
  • until the incident is closed or the monitor is paused.

Reminders are created by a single instance at a time, with a conditional update, so you do not receive duplicates.

When a success ping arrives for a monitor with an open incident, the incident closes and a recovery notification is sent. A recovery is only sent for an incident that was open.

Pausing a monitor does not close its open incident, but reminders stop. Resuming turns the reminders back on. The same happens while a maintenance window covers the monitor.

Situation Result
Second failure while the incident is open Nothing new is sent.
You delete a channel New alerts stop going to it. Queued messages for it are marked failed.
A channel fails to deliver Retried after 30 seconds, 2 minutes, 10 minutes and 1 hour, then marked failed and kept visible.
The job recovers while you sleep One recovery message, the incident is closed.
The monitor is paused for the weekend No alerts, no reminders. Resuming restarts the expectation from now.
A run is merely slow A slow run alert goes out. No incident is opened.

A job wrapped with the host agent opens an incident like any other monitor:

  • The command ended with an exit code other than 0, or was killed by a signal: the reason is failed and the detail says exit code N or terminated by signal SIGKILL. The masked end of the output (4 KB by default) is attached and used by Why did it happen?.
  • The job did not run, or cronbeat never got to report its end: missed after the grace period; too_long when it started and a maximum runtime was exceeded.

There is no agent_lost incident for host agents: a server that is off simply makes its jobs go late and down one by one.

If the Kubernetes agent itself disappears, one agent_lost incident is opened for the cluster, instead of one per CronJob. It is sent to all channels of the project and closed (with a recovery message) when the agent reports again. See Failure reasons and agent loss.

Monitor name, status (DOWN, RECOVERED, REMINDER, or a slow run notice), reason (missed, failed, too_long, agent_lost) with detail, the last successful run, the expected time, and a link to the monitor. Email subjects look like [CronBeat] DOWN: Nightly backup.

Delivery and retries: Channels and delivery. Webhook payloads: Signed webhooks.

On the monitor page, an incident has a Why did it happen? button. It explains the incident from the history of that monitor, without any guessing. Everything it says is a number or a text CronBeat already has:

  • How long and how often: how many runs in a row failed since when, and how the runs before that went (“The 27 runs before that all succeeded”). The time of the last success.
  • Trend: when the runs were taking 10% or more longer than before the failure, with the normal duration for comparison.
  • Repetition: how many times the same reason opened an incident on this monitor in the 30 days up to this one.
  • The failed run’s own words: the text the newest failed run sent with its fail ping (shortened to 300 characters, shown as plain text).
  • Why a Kubernetes run did not come (agent 0.4.0 and newer, for a missed run that is still open): the CronJob forbids concurrent runs and a Job is still running; Kubernetes did not create a Job at the expected time (with its startingDeadlineSeconds and when it last scheduled one); or a Job was created but never reported a start. This uses what the CronJob says about itself, and only facts the agent reported after the run was due.
  • What to check: advice for the cause. It reads the failure text and the output of a host agent job (exit code 127: command not found, exit code 126: not executable, SIGKILL: often out of memory, SIGTERM: a shutdown). For the Kubernetes agent it reads the failure text: OOMKilled (raise the memory limit), ImagePullBackOff, CreateContainerConfigError (a missing Secret or ConfigMap), Unschedulable, Evicted, DeadlineExceeded, and the exit codes 126, 127, 137, 139 and 143. A missed run points at the scheduler and the grace period, a run that took too long at the maximum runtime, a lost agent at the pod, its log and the key. When the cause is not known, it says to look at the log.

It is available to every role and works for resolved incidents too. API: GET /api/incidents/{id}/autopsy, see REST API.

Under the autopsy, Explain with AI (members and above, Pro and Enterprise) writes a short explanation: what most likely happened, which fact shows it, and up to three things to check. It is made only when you click, never in the background, and an alert never waits for it.

  • What the model sees: the facts of the autopsy and the output of the newest failed run (at most 1,500 characters). Passwords, tokens, API keys, Authorization headers, credentials in URLs and email addresses are removed before the text leaves CronBeat. Nothing else about your account, cluster or code is sent.
  • It does not guess: when the facts are not enough, it says so and names what to check.
  • Cost ceiling: one explanation per incident, and a monthly count per project (30 on Pro, 300 on Enterprise). It is kept, so opening the incident again costs nothing.
  • Provider: Anthropic (Claude Haiku 5.5). The answer is advice, check it before you act.

API: GET and POST /api/incidents/{id}/explanation. The plan refuses with 403 and the code plan_limit_exceeded; a server where AI is switched off answers 503.