Alert Rules
The Alert Rules tab lets you create, manage, and monitor alert rules that evaluate conditions on your metrics, logs, and traces data.

Alert Rules Table
All configured alerts are listed with their current status:
| Column | Description |
|---|---|
| Enable/Disable | Toggle to activate or deactivate a rule without deleting it |
| Name | Alert rule name |
| Description | What the alert monitors |
| Current State | normal (green) — condition not met, pending (amber) — condition met but the firing frequency not yet satisfied, or firing (red) — notifications active. An evaluation failing chip, or a ⚠ for a partly failing evaluation, appears beside it when the rule can't be checked — see Evaluation health. |
| Evaluation Interval | How often the rule is checked (e.g., 1m, 2m, 5m) |
| Last Evaluation Time | When the rule was last evaluated |
| Created By | User who created the rule |
Clicking a rule opens its detail page with the live condition chart and incident history. Clicking a column header sorts the whole list, not just the page on screen.
A rule shows a lock beside its name when editing is restricted.
Finding rules
The sidebar offers the same explorer-style faceted filters as the Alert Events page — narrow by enabled/disabled, state, severity, query type, notification channel, creator, or evaluation health. Every label your rules carry is a filter too — team, service, env, whatever you've added.
You can also type filters into the search bar as key:value:
| Typed | Matches |
|---|---|
checkout | Rules whose name contains checkout |
team:payments | Rules with the label team = payments |
-team:payments | Rules without that label value |
severity:critical | Critical rules |
evaluation:Failing | Rules whose evaluation is failing |
- A label whose key is also a built-in filter (for example a label called
status) is offered aslabel.status. - Each label filter has a Not set value that matches rules without that label. Pick Not set with Only to find rules missing a label — say, every rule nobody has given a
teamto. - The sidebar lists the 25 most-used labels. When there are more, it says "Showing the most-used labels. Some label filters aren't listed." — type
key:valuein the search bar to filter on any of them. - Label keys with characters other than letters, digits,
_and.(for examplekubesense.io/builtin) can only be filtered from the sidebar.
Alert lists
Lists group rules — by team, service, or anything else — so you can open just the rules you care about. A rule can be in any number of lists. Lists are for organising only: they don't change what fires, who is notified, or who can edit a rule.
The bar above the rules table holds:
- All rules and Unlisted (rules in no list), with their counts
- Your pinned lists, then your recent lists
- View all lists, which opens the lists panel beside the table
Lists are shared — everyone sees the same lists. Pins and recents are your own.
| To | Do |
|---|---|
| Create a list | In the lists panel, click +. Names are unique, ignoring case. |
| Rename or delete a list | Hover the list in the panel → ⋯ → Rename / Delete. Deleting a list never deletes its rules. |
| Pin a list to the bar | Hover it → Pin to the bar. Up to 5 lists can be pinned; drag pinned lists in the panel to reorder them. |
| Add rules to lists | Select the rules → Add to list → tick the lists → Save. |
| Remove rules from a list | Select them → Add to list → untick the list → Save. |
A list becomes recent after you've had it open for a few seconds. The current list is part of the page URL, so you can share a link to it.
Anyone can pin lists. Creating, renaming and deleting lists, and adding rules to them, needs Editor access to alerts.
Bulk actions
Tick rules to select them — the selection is kept as you page, search and filter. Once a whole page is ticked, Select all N selects every matching rule. Up to 500 rules can be selected at once.
A bar appears with the actions:

| Action | |
|---|---|
| Add to list | File the rules into lists |
| Enable | Turn the selected rules on. Shown with the number that would change. |
| Disable | Turn them off, after a confirmation. Disabled rules stop being evaluated; their firing alerts resolve and their channels get a RESOLVED notification. |
| Delete | Delete them, after a confirmation |
Rules already in the requested state are left alone, and the result says how many were changed, already in that state, or failed.
If you can't edit some of the selected rules (because editing is restricted on them), every action is disabled until you deselect those — a bulk change never applies to only some of what you picked.
Creating an Alert Rule
Click Create New Alert Rule to open the template picker — pick a ready-made recipe, an alert-type starter, or start blank. The editor has four sections to configure. (You can also import rules as JSON.)
Step 1 — Define Alert Query
Build the data query that the alert evaluates. This uses the same query builder available in the Data Explorer.

| Field | Description |
|---|---|
| Data Source | Choose Logs, Metrics, or Traces |
| Filters | Filter data using common filters or advanced filter expressions (e.g., type:ERROR, level IN (ERROR, WARN)) |
| Aggregation | Aggregation function to apply — count(*), avg(), sum(), max(), min(), p50(), p90(), p95(), p99() |
| Group By | Group results by a column (e.g., workload, namespace, level). Produces multi-series alerts that evaluate and fire independently per group. |
| Label Type | Controls how series labels are generated |
| Step | Bucket duration for time-series aggregation (Auto, 30s, 1m, etc.) |
Click Run to preview the query result as a time-series chart. The red dashed threshold line shows where your alert condition will trigger.
Multiple Queries and Formulas
You can add multiple queries using Add Query (each labeled A, B, C, etc.) and combine them with Add Formula to create computed conditions. For example:
- Query A = total request count (logs)
- Query B = error request count (logs)
- Formula C =
B / A * 100(error rate percentage)
The alert condition can then evaluate the formula result.
SLO alerts
An alert can watch a service level objective instead of a raw query. Start from the SLO burn rate or SLO error budget balance template (under By alert type in the template picker), or click Create & Set Alert on the SLO page, which saves the SLO and opens the editor pre-filled.
| Field | Description |
|---|---|
| SLO | The SLO to watch. It must be active; one SLO per rule. |
| Signal | Burn rate — how fast the error budget is being spent (1 = exactly on budget). Error budget balance — how much budget is left. |
| Evaluate the last | Burn rate only: the long window, 1–48 hours. The rule also checks the last 5 minutes, and both windows must breach — so it fires on a sustained burn but resolves quickly once it stops. |
| Alert scope | Overall, or Per group for an SLO with groups |

The templates start at burn rate ≥ 1 and budget balance ≤ 10, both at Warning. SLO alerts are ordinary rules — edit, route and restrict them like any other. They have no warning band and can't be multi-threshold.
Older SLOs may still have the generated Burn Rate Fast/Slow and Error Budget Critical/Low rules. Those are managed by the SLO; their detail page shows Legacy PromQL SLO alert with an action to migrate them to the current kind.
Step 2 — Alert Conditions
Choose the condition type and configure when the alert should fire. The tabs are Single Threshold, Multi-Threshold (several conditions combined with AND / OR), Change Alert, and New Value Alert (logs only).
Threshold Alert
Fires when the query value crosses a fixed threshold.

| Field | Description |
|---|---|
| Run alert every | Evaluation interval (e.g., every 2 Minutes) |
| Fires, when metric | Which query or formula to evaluate (A, B, C, etc.) |
| Evaluated over the last | Time window for the data query lookback |
| Operator | equal to, above, above or equal to, below, below or equal to |
| Alert Threshold | The threshold value to compare against |
Firing frequency controls how many breaches are required before the alert fires:
| Frequency | Behavior |
|---|---|
| At least once | Fire immediately when the condition is met |
| More than once | Fire only after the condition is breached more than N times within a specified window |
| Always | Fire only when the condition is met on every evaluation within the window |

When using more than once, you specify both the number of required breaches and the time window over which to count them. For example, "for 2 times within 5 Minutes" means the condition must be breached more than 2 times in the last 5-minute window before the alert fires.
When using always, the alert fires only if every single evaluation within the breach counting window resulted in a breach — useful for avoiding false positives from transient spikes.
Warning and critical thresholds
A threshold rule can warn before it pages. Fill in Warn when (optional) under the threshold:

With Alert Threshold > 1024 and Warn when > 768, the rule has two bands: a value above 768 fires a warning alert, and above 1024 a critical one. Route on the severity label to send warnings to a team channel and criticals to the pager.
- The rule's Severity must be Critical, and the firing frequency At least once.
- The warning value must be crossed first — below the critical value for an above rule, above it for a below rule. Equal / not-equal thresholds have no warning band.
- Leave the field empty for no warning band.
0is a valid warning value.
When the value moves between bands:
| Change | What's sent |
|---|---|
| Warning → critical | A critical alert fires. The warning is closed quietly — receivers see the critical alert, not a "warning resolved" next to it — and shows as Escalated in its history. An acknowledgement on the warning does not carry over: the critical alert pages. |
| Critical → warning | The warning alert fires again. An acknowledgement carries over, so it doesn't re-page. |
| Below both | Resolves |
note: Warning thresholds are enabled per installation. If saving a rule with a warning value is refused, an administrator needs to set ALERT_DUAL_THRESHOLD_ENABLED=true on the KubeSense API.
Multi-Threshold (composite conditions)
Multi-Threshold fires on a combination of conditions — "error rate above 5% and traffic above 100 req/s", or "p95 latency above 500ms or errors above 50".
- Add your queries in Step 1 (A, B, …).
- Open the Multi-Threshold tab and choose Fire when [any | all] of these conditions hold — any is OR, all is AND.
- Each condition is a query, an operator (
>,>=,<,<=,=,!=) and a value. Add condition adds another; a rule needs at least two.
The editor reads the rule back as a sentence (Reads as: …) so you can check it.

Conditions on different queries. When conditions read different queries, KubeSense has to know which series belong together. Under Match their series, choose:
- on the labels — name the labels that identify a series in every query, e.g.
service, namespace. Each query must return one series per label combination (use a group-by, orsum by (service, namespace)(…)in PromQL). Series missing the labels, or duplicated, are left out and reported on the rule. - each query returns a single value — for queries without a group-by.
All conditions are judged over the same Evaluated over the last window. If one query has no data for a series, its conditions count as unknown: an all rule won't fire for that series, while an any rule can still fire on the other conditions.
What responders see: the notification's threshold is the whole expression, and its condition line shows each condition's reading — e.g. A > 500: 800 (met) OR B > 100: 150 (not met). The alert's value is the reading of the first condition that's met.
The chart has a picker in its header to show one condition at a time — that condition's query against its own threshold. All conditions is offered when every condition reads the same query.
Multi-Threshold rules:
- are threshold rules only — not change or new-value
- can fire At least once or More than once, not Always
- can't use a formula as a condition's query
- have one severity — no warning band
Switching to Multi-Threshold starts condition 1 from your single threshold; switching back keeps condition 1 as the threshold and sets the others aside until you return.
note: Composite conditions are enabled per installation. If there is no Multi-Threshold tab, an administrator needs to set ALERT_COMPOSITE_CONDITIONS_ENABLED=true on the KubeSense API. Existing multi-threshold rules stay editable either way.
Change Alert
Fires when the query value changes by a specified amount relative to a previous time period.

| Field | Description |
|---|---|
| Change type | change in value (absolute difference) or change in % (percentage difference) |
| Operator | equal to, above, below, etc. |
| Threshold compared to | The historical period to compare against (e.g., 5 Minutes ago) |
Use change alerts to detect sudden spikes or drops relative to recent behavior. For example, "fire when error count changes by more than 50% compared to 5 minutes ago."
New Value Alert
Fires when a value appears that was not seen in the comparison window.

| Field | Description |
|---|---|
| New value compared to | The historical window to check against (e.g., 5 Minutes) |
Use new value alerts to detect previously unseen patterns — new error types, new endpoints, new log levels, or any other unexpected values appearing in your data.
No-data behavior
When an evaluation returns no data at all (a scrape gap, a sparse trace source, a deleted target), the rule's no-data setting decides what happens:
| Option | Behavior |
|---|---|
| Resolve (Normal) (default) | Treat no data as recovered — a firing alert resolves |
| Keep previous state | Hold the current state — a firing alert stays firing through the gap. Recommended for sparse sources (e.g. per-workload trace alerts on short windows) to avoid resolve/re-fire flapping. |
| Trigger (Firing) | Treat the disappearance of data itself as an incident and fire |
A value of 0 is real data, not "no data" — an error-count rule reading 0 during a quiet period resolves normally regardless of this setting.
If evaluation fails
Separate from no data: an evaluation fails when the rule can't be checked at all — a query error, or a datastore that doesn't answer in time. If evaluation fails decides what happens once a rule has been failing for 5 minutes in a row:
| Option | Behavior |
|---|---|
| Alert on error (default for new rules) | Keep the alert's current state, and send a separate evaluation failing alert to the rule's channels |
| Keep last state | Keep the current state and notify nobody. Rules created before this setting existed behave this way. |
| Trigger (Firing) | Treat the failure as a breach and fire |
| Resolve (Normal) | Resolve open alerts. The editor warns you: while the rule can't check them, a real problem would look resolved. |
The evaluation failing alert is named <rule>: evaluation failing and says since when and why, in plain words (for example the metrics datastore did not answer in time). It carries the rule's labels — so it reaches the same channels — plus kubesense_evaluation_error="true", which you can route on. It resolves itself with evaluation recovered at the first successful evaluation.
The 5-minute grace period means a brief datastore hiccup changes nothing.
Step 3 — Alert Configuration
| Field | Description |
|---|---|
| Severity | Critical, Error, Warning, or Info |
| Alert Name | A descriptive name for the alert. Supports {{label}} placeholders resolved per instance — e.g. High errors on {{workload}}. |
| Alert Description | Optional markdown explaining what the alert means and what to do about it — headings, lists, tables, links and code blocks, plus placeholders |
| Labels | Key-value pairs attached to the alert. Labels appear in notifications and can be used for routing (e.g., team:backend, env:production). |
| Attach samples | For logs/traces rules: capture up to N matching rows at fire time and attach them to notifications and the alert detail page, so responders see example offending lines without leaving the alert |
| Exclude group-by keys from labels | Keep the alert's labels to the ones you set above — each group-by value moves into a single kubesense_series label instead of becoming a label of its own. Each series is still its own alert. Useful when silences, maintenance windows or channel routing should match only your own labels. Changing it on a firing rule resolves its open alerts and fires them again once. |
| Graph | Attach a graph of the evaluation to notifications — see Graphs in notifications |
| Recovery | Whether this rule sends a RESOLVED message: Use the notification channel's setting (default), Always notify on recovery, or Never notify on recovery. Never suits informational alerts that just need to fire — the alert still clears in KubeSense, and other rules on the same channel are unaffected. |
The description can also link straight to the logs or traces behind the alert — see Links to logs and traces.
Step 4 — Alert Routing
Choose how notifications are delivered when the alert fires. Routing type is one of:
Notification Channel — pick one or more channels from the list. Every alert from the rule goes to each of them — Slack and PagerDuty, say. You can create a channel from the same list.
Notification Channel Policy — send the rule's alerts to the channels whose Matching Labels match the alert's labels. Notify decides how many:
| Notify | |
|---|---|
| All matching channels (default for new rules) | Every channel whose matching labels match is notified |
| First matching channel only | Only the most recently created matching channel is notified; the others get nothing |
Preview Routing shows which channels the rule's alerts would reach, based on its labels.

A rule with no channel is allowed: its alerts still appear on the Alerts page and keep their history, but nobody is notified unless a channel picks them up by its matching labels. The editor warns you when you save one.
note: A channel you pick by name always gets the alert, and only the channels you picked get it — another channel's matching labels, or a catch-all channel, never takes it as well. If a picked channel is later disabled or deleted, that rule's alerts go nowhere until you pick another.
Notification timing
Each channel has default timing (see Notification timing). A rule can override it for itself:
| Field | Description |
|---|---|
| Remind every | How often to re-send while the alert stays unresolved. Presets 15m, 1h, 4h, 24h, or custom. |
| Batch updates for | How long to collect new, recovered and severity changes into one message. Longer windows send fewer messages but delay critical updates and recoveries. Minimum 1m. |
Each starts on the default, showing the value the rule's channels use — Channel default · 1h once a channel is picked; choose Custom to override it. An override applies to this rule only, on every channel it notifies — other rules keep their channels' timing.

- Durations are written like
30m,1h,1h30m— whole numbers, largest unit first.1.5hand1daren't accepted. - Remind every must be a whole multiple of the batch interval — the rule's own, or each channel's. Reminders are only sent at the end of a batch, so the editor refuses a value that would really remind at a different interval and suggests one that works.
- Changing or clearing an override re-sends the rule's open alerts once.
Graphs in notifications
With Attach a graph of the evaluation to notifications ticked, a firing notification carries a chart of the value against the threshold, so whoever is paged sees the shape of the problem before opening KubeSense.
- For a metrics rule the chart shows the samples the value was taken from; for a logs, traces or formula rule it shows the rule's value at several evaluations, ending with the one that fired.
- Graphs go on firing notifications, not resolved ones — for up to 5 newly firing series per evaluation.
- Graphs and their links expire after 30 days.
| Channel | What it shows |
|---|---|
| Slack (App), Google Chat | An image under each alert, up to 5 per message |
| Up to 5 images | |
| Slack (Webhook) | One image, plus a 📈 Graph link for each graphed alert |
| Teams, PagerDuty, Jira Service Management, Datadog On-Call | No graph |

The option is available for rules with one query, or a formula, and an above / below threshold. It's disabled — with the reason — for rules with several conditions, change and new-value alerts, equal / not-equal thresholds, and several queries without a formula.
note: Graphs are switched on per installation. If the option doesn't appear in the editor, an administrator needs to enable alert graph snapshots on the KubeSense deployment. The images are fetched by Slack and mail clients, so the snapshot service must be reachable from the internet.
Sending a test alert
Send test alert, at the bottom of the editor, sends a real alert through the same path a firing rule takes — so you can check where it lands and how it reads before going live. It works on a rule you haven't saved yet.
- It runs the rule's query and borrows the labels of a real series — pick which one under Sample series — so label-based routing behaves as it would for a real alert. If the query returns nothing, the test carries only the rule's own labels and the dialog warns that routing may differ.
- The dialog previews the notification and marks each channel Sent or Skipped — and notes when another channel's matching labels would take the real alert instead.
- The test is named
[TEST] <rule name>, says who sent it, and resolves itself after 2 minutes. It never joins a real incident's notifications, and it isn't recorded on the Alert Events page. - Delivery takes about 10 seconds.

Limits: pick between 1 and 20 channels; disabled channels are skipped; up to 6 test alerts per minute per person. Sending one needs access to notification channels as well as alerts.
Alert Lifecycle
States
| State | Description |
|---|---|
| Normal | The alert condition is not met. The system continues evaluating at each interval. |
| Pending | The condition is met but the firing frequency requirement (e.g. more than N times) is not yet satisfied. No notification has been sent. |
| Firing | The alert condition is met and the required firing frequency is satisfied. Notifications are sent. |
State Transitions
- Normal → Firing — The condition is met and the firing frequency requirement is satisfied. A notification is sent and an alert event is recorded.
- Firing → Normal — The condition is no longer met (for
at_least_once: no breaches in the breach counting window; formore_than_once: breach count drops below the threshold; foralways: at least one evaluation did not breach). A resolved notification is sent. - Grouped (multi-series) rules track these transitions per instance — each series fires and resolves independently, and each transition is visible on that instance's event timeline.
Resolved Notifications
When an alert transitions from firing back to normal, a resolved notification is automatically sent to all configured channels, so your team knows the issue has been addressed. An alert can also be resolved by hand.
Evaluation health
A rule that can't be evaluated can't fire or resolve, so KubeSense shows when that's happening:
- The rule's detail page shows Last evaluated and Last successful evaluation. An evaluation that found no data still counts as successful. A rule that hasn't succeeded yet reads Not recorded yet.
- While evaluations fail, the detail page shows a banner with when it started failing, the cause, and what the rule's If evaluation fails setting is doing about it. A rule where only some series fail shows a warning instead.
- In the rules list, an evaluation failing chip appears beside the state. The state itself stays as it was: a rule that can't evaluate neither fires nor resolves until evaluations succeed again.
- Filter the list with
evaluation:Failing(or the Evaluation filter: Healthy, Partial, Failing) to find every rule with a problem.

Multi-Series Alerts
When a query uses Group By, the alert evaluates each group independently. For example, if you group by workload and three workloads breach the threshold, you receive three separate alert notifications — each with the specific workload name and value in the labels.
This is useful for scenarios like:
- Error count per workload exceeding a threshold
- Latency per namespace crossing an SLO boundary
- Request rate per service dropping below expected levels
Restricting who can edit a rule
Every alert rule is open by default: anyone whose role has Manage Alert Rules at Editor can change it. Restricting a rule narrows that to its owner and the people the owner names. The rule stays visible to everyone with alerts access. Only changing it is restricted.
Opening the dialog
Open the rule's detail page and click Access. Anyone who can see the rule can open the dialog and read who may edit it. Only the rule's owner or an Alerts Admin can change it.
Restricting a rule
- Click Restrict Editing.
- Under People with access, add people by name or email. Each person gets a level, Viewer or Editor. The owner is pinned at the top and cannot be removed.
- Under Everyone else, choose what anyone with alerts access who is not named gets. Viewer is the default.
- Click Save. Nothing is saved until you do.
| Level | What they can do |
|---|---|
| Viewer | See the rule, its alerts and its history, and acknowledge or assign its alerts |
| Editor | Also edit the rule, enable or disable it, delete it, and manually resolve its alerts |
Restore Full Access removes the restriction and the list of people with it.
note: A rule cannot be hidden. There is no "No access" level for alert rules, so a restricted rule and its alerts stay visible to everyone with alerts access.
What a restricted rule looks like
A restricted rule shows a lock beside its name. For someone who may not edit it, Edit, Delete and the enable toggle are disabled, and the editor opens read-only with a note saying who to ask. Clone stays available, since a clone is a new rule owned by whoever makes it.
Owners and Alerts Admins
Whoever creates a rule owns it. Rules that existed before this feature are owned by their creator where that user still exists, and otherwise have no owner.
Alerts Admin is a role permission (see Role Access). Someone who holds it, along with Manage Alert Rules at Editor, can edit any restricted rule and change who has access to it. Each time they change access on a rule they do not own, the audit log records it as an admin override. A rule with no owner can only be restricted by an Alerts Admin, who becomes its owner.
Alert rules that an SLO generates are managed by the SLO. Their access cannot be set here.
Things to know
- A grant never gives more than the person's role allows. Someone whose role has alerts at Viewer cannot edit a rule, whatever level they are given on it.
- The address you add must belong to an existing user. Saving is refused otherwise, and the message names the addresses that did not match.
- If someone else changes the rule's access while you have the dialog open, your save is refused and the dialog shows their version.
- The API enforces the restriction, so it applies to direct API calls and API keys as well as the page.
- Every access change is recorded in Settings → Audit Logs.
note: If the dialog says changing access is not enabled on this deployment, an administrator needs to set ALERT_ACCESS_CONTROL_ENABLED=true on the KubeSense API. Restrictions that already exist are enforced either way.
Example Alert Rules
| Name | Type | What it monitors |
|---|---|---|
| Error log alert | Threshold | Error log count exceeds a limit |
| 499 Error Spike - traces | Change | Sudden increase in 499 status codes from trace data |
| Low Login Activity | Threshold | Login activity drops below expected levels |
| Failed Login Attempts >= 1 | Threshold | Any failed login attempt detected |
| Node max capacity | Threshold | Node CPU or memory approaching capacity |
| Detect Log level change | New Value | Unexpected log levels appearing |
| HTTP 500 Error Count | Threshold | HTTP 500 errors exceed a threshold |
| Application Error Alert | Threshold | Application error logs detected |