|
| 1 | +--- |
| 2 | +navigation_title: Alerts |
| 3 | +applies_to: |
| 4 | + stack: unavailable |
| 5 | + serverless: preview |
| 6 | +products: |
| 7 | + - id: kibana |
| 8 | +description: "Alert episodes in experimental alerting features: lifecycle states, series and episodes, signals versus alerts, and where to find them." |
| 9 | +--- |
| 10 | + |
| 11 | +# experimental alerting features alerts |
| 12 | + |
| 13 | +When a rule fires repeatedly on the same problem, a flat list of events doesn't tell you when the issue started, whether it's still happening, or how long it's been going on. Alert episodes fill that gap. Each episode is a persistent record of one issue on one series, from first breach through recovery, with every evaluation appended to the same history. Nothing is overwritten. |
| 14 | + |
| 15 | +<!--[CONTENT NEEDED for M2: UI. Once the navigation and page name have been confirmed, add instructions for opening the Alerts page.] |
| 16 | +--> |
| 17 | + |
| 18 | +## Alert lifecycle [alert-lifecycle] |
| 19 | + |
| 20 | +Every alert episode moves through these states: |
| 21 | + |
| 22 | +``` |
| 23 | +inactive → pending → active → recovering → inactive |
| 24 | +``` |
| 25 | + |
| 26 | +| State | What it means | |
| 27 | +| --- | --- | |
| 28 | +| Inactive | Problem fully resolved. You get a recovery notification. | |
| 29 | +| Pending | Errors detected, but the system is waiting to confirm it's a real problem before fully alerting. | |
| 30 | +| Active | Problem confirmed and ongoing. This is when you get notified. | |
| 31 | +| Recovering | Errors have stopped, but the system is waiting to confirm it's truly resolved. | |
| 32 | + |
| 33 | +<!-- TODO: Uncomment when PR #6523 (rules) is merged: |
| 34 | +Activation and recovery thresholds control how many consecutive evaluations must agree, or how long the condition must persist, before transitioning. Refer to [Configure a rule](rules/configure-a-rule.md#activation-recovery-thresholds) to learn more about these settings. |
| 35 | +--> |
| 36 | +Activation and recovery thresholds control how many consecutive evaluations must agree, or how long the condition must persist, before transitioning. |
| 37 | + |
| 38 | +### Example: First breach opens, first clear closes |
| 39 | + |
| 40 | +A checkout-latency rule runs in Alert mode every 5 minutes. Latency breaches at 14:05 and clears at 14:50: |
| 41 | + |
| 42 | +1. **14:00** — Routine check. p95 is within budget. The episode is `inactive`. |
| 43 | +2. **14:05** — p95 jumps to 3.1s. The first breach is detected. With no activation threshold, the episode opens immediately as `active`. |
| 44 | +3. **14:10–14:45** — Every evaluation finds high latency. The same episode stays `active`. No new episodes are created. |
| 45 | +4. **14:50** — p95 drops back under 2s. With no recovery threshold, the episode resolves immediately to `inactive`. |
| 46 | + |
| 47 | +One problem is tracked in one episode, even though the rule evaluated many times while the condition was ongoing. |
| 48 | + |
| 49 | +<!-- TODO: Add image once alert-episode-example-without-threshold.png is available in explore-analyze/images/ |
| 50 | +:::{image} ../../images/alert-episode-example-without-threshold.png |
| 51 | +:alt: Timeline of a checkout-latency alert episode without thresholds. At 14:05, p95 jumps to 3.1s and the episode opens immediately as active. It stays active through 14:45. At 14:50, p95 drops back under 2s and the episode resolves immediately as inactive. |
| 52 | +::: |
| 53 | +--> |
| 54 | + |
| 55 | +### Example: Waiting for confirmation before opening and closing |
| 56 | + |
| 57 | +The same checkout-latency rule, now with an activation threshold of 2 consecutive breaches and a recovery threshold of 2 consecutive clears: |
| 58 | + |
| 59 | +1. **14:00** — Routine check. p95 is within budget. The episode is `inactive`. |
| 60 | +2. **14:05** — p95 jumps to 3.1s. The first breach is detected. The episode is created in `pending` and the system starts counting consecutive breaches. |
| 61 | +3. **14:10** — p95 is still elevated. The second consecutive breach meets the activation threshold. The episode moves from `pending` to `active`, and the engineer is paged. |
| 62 | +4. **14:10–14:45** — Latency stays elevated. The episode remains `active`. |
| 63 | +5. **14:50** — p95 drops back under 2s. The first clean check moves the episode to `recovering`. The system starts counting consecutive clears. |
| 64 | +6. **14:55** — A second consecutive clear meets the recovery threshold. The episode moves from `recovering` to `inactive`. |
| 65 | + |
| 66 | +Thresholds prevent brief spikes from opening episodes and transient dips from closing them prematurely. The episode waits in `pending` until the problem is confirmed, and waits in `recovering` until the resolution is confirmed. |
| 67 | + |
| 68 | +<!-- TODO: Add image once alert-episode-example-with-activation-threshold.png is available in explore-analyze/images/ |
| 69 | +:::{image} ../../images/alert-episode-example-with-activation-threshold.png |
| 70 | +:alt: Timeline of a checkout-latency alert episode with activation threshold of 2 and recovery threshold of 2. At 14:05, the first breach puts the episode in pending. At 14:10, the second consecutive breach moves it to active. At 14:50, the first clean check moves it to recovering. At 14:55, the second consecutive clear resolves it to inactive. |
| 71 | +::: |
| 72 | +--> |
| 73 | + |
| 74 | +## Series |
| 75 | + |
| 76 | +A series is the ongoing relationship between a rule and one specific thing it monitors. |
| 77 | + |
| 78 | +Your rule monitors services. Each service it tracks has its own series, one for `checkout-service`, one for `payment-service`, and so on. A series exists for as long as that rule keeps monitoring that service. |
| 79 | + |
| 80 | +Think of it like a patient's medical file. The file exists as long as the patient is in the system. Individual health incidents come and go, but the file persists. |
| 81 | + |
| 82 | +<!-- TODO: Uncomment when PR #6523 (rules) is merged: |
| 83 | +For the fields that identify a series in alert event documents, refer to [Rule event and field reference](rules/rule-event-field-reference.md#rule-reference). |
| 84 | +--> |
| 85 | + |
| 86 | +### How series and episodes relate |
| 87 | + |
| 88 | +An episode lives inside a series. A series can contain many episodes over its lifetime, one for each time that service had a problem. |
| 89 | + |
| 90 | +``` |
| 91 | +Series: checkout-service |
| 92 | +│ |
| 93 | +├── Episode 1: errors on April 10 (active → inactive) |
| 94 | +├── Episode 2: errors on April 15 (active → inactive) |
| 95 | +└── Episode 3: errors on April 18 (active right now) |
| 96 | +``` |
| 97 | + |
| 98 | +The series is the container. Episodes are the individual problems that happened within it. When the series breaches again after recovering, a new episode starts. |
| 99 | + |
| 100 | +This means you can track "the checkout service was broken from 02:14 to 03:21" and "the payment service was broken at the same time" as separate episodes, even when both come from the same rule. |
| 101 | + |
| 102 | +:::{tip} |
| 103 | +Snooze operates at the series level, not the episode level. If you snooze `checkout-service`, you're silencing all notifications from that series for the next X hours, regardless of how many new episodes start during that time. You're quieting a specific ongoing situation, not a single alert. |
| 104 | +::: |
| 105 | + |
| 106 | +### A practical way to think about it |
| 107 | + |
| 108 | +| Concept | Analogy | |
| 109 | +| --- | --- | |
| 110 | +| Rule | A security camera watching the building | |
| 111 | +| Series | The camera's feed for one specific door | |
| 112 | +| Episode | A specific incident caught on that feed | |
| 113 | +| Rule events | The individual video frames | |
| 114 | + |
| 115 | +The camera runs continuously (rule), always watching door 3 (series). One night someone breaks in. That's an episode. The frames captured during the break-in are the rule events. |
| 116 | + |
| 117 | +## Signals versus alerts |
| 118 | + |
| 119 | +Every time a rule finds a match, it writes a document to `.rule-events`. Whether that document is a signal or an alert depends on the rule's mode, and that choice determines whether the system only records what happened or actively tracks it through to resolution. |
| 120 | + |
| 121 | +A **signal** is a one-time observation. The system writes it and moves on, no lifecycle, no notifications, no follow-up. An **alert** participates in an episode. The system links it to every other document from the same problem, tracks the lifecycle states, and routes notifications through action policies. |
| 122 | + |
| 123 | +| Type | What it is | When it's created | |
| 124 | +| --- | --- | --- | |
| 125 | +| Signal | A point-in-time record that the query matched (`type: signal`). Stored in `.rule-events`. | Rules in Detect mode | |
| 126 | +| Alert | A lifecycle-tracked episode with `type: alert` and `episode.*` fields. Stored in `.rule-events`. | Rules in Alert mode | |
| 127 | + |
| 128 | +A rule in Detect mode only writes signals. It never opens episodes, so action policies have nothing to match against. |
| 129 | + |
| 130 | +## Where alerts live |
| 131 | + |
| 132 | +Alert events are stored in `.rule-events`. Triage actions (acknowledge, snooze, resolve) are stored in `.alert-actions`. Both are queryable in Discover. |
| 133 | + |
| 134 | +Every time you take an action on an episode — acknowledging it, snoozing it, resolving it, editing its tags — {{kib}} writes a new document to `.alert-actions`. These documents are append-only and can be queried in Discover for auditing and metrics such as mean time to acknowledge (MTTA). For field definitions, refer to [Alert states and fields reference](alerts/alert-states-and-fields-reference.md#alert-states-reference). |
| 135 | + |
| 136 | +<!--[CONTENT NEEDED for M2: UI. "V2 Alerting Preview" is a development-phase navigation label. Once the navigation and page name have been confirmed, add instructions for opening the Alerts page.] |
| 137 | +--> |
| 138 | + |
| 139 | +### Data stream storage and retention |
| 140 | + |
| 141 | +Both `.rule-events` and `.alert-actions` are data streams, append-only, time-series stores optimized for writes. On every rule evaluation, {{kib}} writes a **new document** to `.rule-events` rather than updating the previous one. Each document is a point-in-time snapshot. The `episode.status` field records the lifecycle state the episode was in at that exact evaluation. Nothing is overwritten. |
| 142 | + |
| 143 | +Because every evaluation produces its own document, you can reconstruct the full history of an episode by querying all documents that share the same `episode.id`. Refer to [Query alerts and signals in Discover](alerts/query-alerts-and-signals-in-discover.md#explore-alerts-discover) for example queries. |
| 144 | + |
| 145 | +Retention is managed automatically through ILM. Older backing indices move through storage tiers and are deleted when the retention window expires. You do not need to manually remove documents. {{kib}} manages versioning, retention, and lifecycle for both streams. Do not change their mappings or index settings. |
| 146 | + |
| 147 | +## Related pages |
| 148 | + |
| 149 | +- **[View and manage alerts](alerts/view-and-manage-alerts.md):** Open the alert episodes table, triage active episodes, and acknowledge, snooze, or resolve them. |
| 150 | +- **[Query alerts and signals in Discover](alerts/query-alerts-and-signals-in-discover.md):** Use {{esql}} to query `.rule-events` and `.alert-actions` for ad hoc analysis and dashboards. |
| 151 | +- **[Alert states and fields reference](alerts/alert-states-and-fields-reference.md):** Look up lifecycle states, field names, and episode document structure. |
| 152 | +<!-- TODO: Uncomment when PR #6525 (workflows/notifications) is merged: |
| 153 | +- **[Notifications](notifications.md):** Set up action policies to route alert episodes to the right people and channels. |
| 154 | +- **[Notification gating](notifications/notification-gating.md):** Understand how acknowledge, snooze, and deactivate control whether an episode triggers a notification. |
| 155 | +--> |
0 commit comments