ON FAIL and ON CHANGE
Every channel has two triggers. ON FAIL alerts while a monitor stays failed. ON CHANGE alerts on the life of an incident: when it opens, when it gets worse, when it is resolved. They are independent: switch on one, the other, or both.
Both rules sit at the top of the monitor’s Actions tab, one row each. The switches on each channel card below them pick which rule the channel follows.
by the probe] --> F{ON FAIL rule:
x+1 failed checks in a row
at or above the level?} C --> P{ON CHANGE policy} F -- "yes, up to 'for x' times" --> FA[On fail alert] P -- incident --> SM[Incident state machine
open / escalate / recover] P -- legacy --> LG[Every status change
debounce optional] SM --> CA[On change alert] LG --> CA
ON FAIL
| Field | Values | Default | Meaning |
|---|---|---|---|
| notify if status is … or worse | minor, major, critical, error | critical | Lowest status that counts as a failure. |
| after x checks | 1 to 10 | 3 | Further failed checks needed before the first alert. |
| for x checks | 0 to 100 | 0 | Alerts sent per failure episode. 0 = at every failed check. |
Statuses are ranked: OK and UNKNOWN (0), MINOR (1), MAJOR (2), CRITICAL (3), ERROR, TIMEOUT, EXCEPTION and CONFIG (4). A check fails the rule when its status is at or above the level, so critical or worse also fires on ERROR and TIMEOUT. Different bad statuses in a row still count as one run.
When it fires. After each check the probe looks at this check and the x before it. If all failed, the alert goes out. With after 3 checks, the first alert comes on the 4th failed check in a row.
Repeats. for 0 checks: one alert per failed check, as long as the failure lasts. for N checks: N alerts, then silence until the monitor recovers.
Recovery. An OK check sends nothing and resets the count: the next failure is a new episode. Exception: PagerDuty and SIGNL4 still receive a resolve, so what ON FAIL opened is closed even with On change off.
ON CHANGE
The policy decides what a “change” is. It has two modes:
| Mode | Behaviour | Who gets it by default |
|---|---|---|
| Incident | One alert when a failure persists, one per escalation, one on recovery. Short blips send nothing. | New probes, new applications, new Sentinel agents |
| Legacy | One alert on every status change (OK → MINOR, MAJOR → CRITICAL, CRITICAL → OK…). | Everything created before 4.3.0 — nothing changes until you switch |
The incident state machine
or flapping
sends OPEN" --> A([ACTIVE INCIDENT]) A -. "worse severity" .-> E["sends ESCALATE
incident stays open"] A -- OK check --> PR([PENDING RECOVERY]) PR -- unhealthy check --> A PR -- "Y OK in a row
sends RECOVER" --> H classDef ok fill:#e8f5e9,stroke:#43a047 classDef bad fill:#ffebee,stroke:#e53935 classDef wait fill:#fff8e1,stroke:#f9a825 class H ok class A bad class PF,PR wait classDef note fill:#fff,stroke:#e53935,stroke-dasharray:4 3 class E note
- Unhealthy = any status but OK (MINOR to CONFIG), whatever the ON FAIL level. UNKNOWN is ignored: it neither advances nor resets a count.
- A change of severity does not restart the failure count: MAJOR, CRITICAL, MAJOR is three unhealthy checks.
| Setting | Default | Meaning |
|---|---|---|
| fail after X checks | 3 | Consecutive unhealthy checks that open the incident, the current one included. |
| recover after Y checks | 3 | Consecutive OK checks that close it. A failure in between keeps it open, without a new alert. |
| escalate | CRITICAL or worse | CRITICAL or worse: alert again when the incident reaches CRITICAL or a worse severity. Every severity increase: on each rise. Disabled: never. Each severity is notified once per incident. |
| flapping (M of last N) | off, 3 of 5 | Also opens the incident when at least M of the last N checks are unhealthy, the latest included. 1 ≤ M ≤ N ≤ 50. |
Example
Policy: defaults (fail after 3, recover after 3, escalate CRITICAL or worse). ON FAIL: critical or worse, after 1, for 3.
| Check | Status | ON FAIL | ON CHANGE, legacy | ON CHANGE, incident |
|---|---|---|---|---|
| 10:00 | OK | — | — | — |
| 10:01 | MAJOR | — | sent | pending (1/3) |
| 10:02 | OK | — | sent | — (blip, back to healthy) |
| 10:03 | MAJOR | — | sent | pending (1/3) |
| 10:04 | MAJOR | — | — | pending (2/3) |
| 10:05 | CRITICAL | — (1 failed) | sent | OPEN (3/3, CRITICAL) |
| 10:06 | ERROR | sent (1st) | sent | ESCALATE (ERROR) |
| 10:07 | OK | — | sent | pending recovery (1/3) |
| 10:08 | OK | — | — | pending recovery (2/3) |
| 10:09 | OK | — | — | RECOVER |
Legacy sends 6 alerts, incident 3.
Where to set it
| Scope | Where | Notes |
|---|---|---|
| Probe (all its monitors) | Right-click the probe → edit server → block Auto baselining → On change notifications | Default for every monitor of the probe. |
| One monitor | Monitor → Actions → ON CHANGE row → Apply | Inherit probe setting (default), Incident with its own values, or Legacy. Apply saves it at once, separately from the form. The row also shows the monitor’s notification state, e.g. active incident (notified up to CRITICAL). Not shown on an Add form, or for a probe older than 4.3.0. |
| Application | App → Actions → ON CHANGE row | Saved with the form. The state is kept on the application (replicated in a cluster). |
| Sentinel agent | Agent → Actions → ON CHANGE row | Saved with the form. Applies to every metric series of the agent. |
The incident state is stored with the check history: it survives a restart, a duplicate or late check is ignored, and two runs of the same monitor cannot send the same alert twice.
What follows the incident
- Channels (email, Slack, Teams, PagerDuty, SIGNL4, script) with On change on get the open, escalate and recover alerts.
- ON FAIL and ON CHANGE on the same channel: when both fire on the same check, the channel receives the ON FAIL alert only.
- PagerDuty / SIGNL4: an OK held back by the policy still sends a resolve for what ON FAIL opened.
- ITSM tickets (ServiceNow, GLPI, Jira): opened on OPEN, updated on ESCALATE, resolved on RECOVER. A held change creates no ticket. In legacy mode they follow every status change, as before.
- Debounce status-change alerts (probe setting) applies to the legacy mode only; the incident policy replaces it.
Which rule sent an alert
Every email, Slack, Teams, PagerDuty and SIGNL4 alert names its trigger: at the end of the subject or title, in a Trigger row and in the footer.
| Trigger | Sent by |
|---|---|
| On fail | The ON FAIL rule |
| On change | A status change (legacy mode) |
| On change · incident opened / escalated / recovered | The incident policy |
| On fail recovery | Back to OK: closes the PagerDuty / SIGNL4 alert that ON FAIL opened, with On change off |
| Test | The Test button of a channel |
A Sentinel agent alert shows incident recovered but not opened or escalated: those show as On change.
Choosing
| You want | On fail | On change | Settings |
|---|---|---|---|
| One page per real incident, and its end | off | on | Incident policy (defaults) |
| A reminder while it stays down | on | optional | after 3, for 0 (every check) or for N |
| Every blip, for audit | off | on | Legacy policy |
| An incident tool (PagerDuty, SIGNL4, ITSM) | optional | on | Incident policy: open, update, resolve |
| A remediation script once per failure | on | off | after x, for 1 |
A trigger works only if it is switched on on the monitor and on its Integrator (Integrator → Notifications). See How an alert reaches someone.
Related
- Thresholds: how a measurement becomes MINOR, MAJOR or CRITICAL.
- Downtime operations: silence alerts during planned work.
- Troubleshooting: when an expected alert does not arrive.