Skip to main content
Version: 1.2

Conditions

Route: /policies ( Conditions tab in the policy drawer)

Conditions define which alerts a policy may modify. The visual builder is the same component used in notification rules and workflows.

See also: Overview · Creating a policy · Modifiers and tools

Policy drawer — Conditions

Alert filters​

Builder controls​

ControlDescription
Group RootTop-level group for all conditions
Add FilterAdd a condition on an alert field
Add GroupNest a sub-group for AND/OR logic
AND / ORCombines siblings in a group (shown with two or more items)
Delete GroupRemove a nested group
Maximum depth reachedNesting limit (five levels)

Drag conditions by the grip handle to reorder. Empty conditions mean no attribute filtering — the policy applies to all alerts allowed by the trigger and time window.

Ambiguous conditions

Mixing AND and OR at the same level without nesting fails validation: "Ambiguous condition: mixing AND/OR in the same group. Please add groups to disambiguate."

Filterable alert fields​

Field names appear in camelCase (same names as %fieldName% in notification templates).

FieldWhat it matches
severityCurrent severity
statusAlert status (open, ack, closed, …)
environmentDeployment environment
resourceAffected system or component
eventEvent type
serviceService list on the alert
groupLogical grouping
tagsAlert tags
attributesCustom metadata — enter the key after selecting the field
originSource system
typeAlert classification
textDescription text
createTime / updateTime / lastReceiveTimeTimestamps
previousSeveritySeverity before last change
userUser who last modified the alert

Additional fields include correlate, duplicateCount, repeat, rawData, sourceId, value, timeout, and others.

Operators​

Available operators depend on field type:

OperatorTypical use
Equals / Not equalsExact match
Is in / Is not inMatch any of several values
Contains / Does not containSubstring or list membership
Greater than / Less than (and or equal)Numbers and dates
Regular expression / Not regular expressionPattern match (case-sensitive or insensitive)

For attributes, all operators are available once you specify the attribute key.

Example scenarios​

Downgrade staging critical alerts​

Group Root [AND]
├─ environment Equals Staging
└─ severity Equals critical

Modifiers (on the next tab): severity set → major.

Tag open alerts from a specific origin​

Group Root [AND]
├─ status Is in open, ack
└─ origin Equals prometheus

Modifier: tags add → reviewed-by-policy.

Scheduled cleanup of old open alerts​

  • General: trigger Daily at fixed time → 02:00, Time Range All Day
  • Conditions: status Equals → open AND createTime Less than (date threshold)
  • Modifiers: status set → closed

Composite OR logic​

For (severity = critical OR severity = major) AND environment = Production:

Group Root [AND]
├─ Group [OR]
│ ├─ severity Equals critical
│ └─ severity Equals major
└─ environment Equals Production

Best practices​

  • Start with environment, severity, status, and service before exotic fields.
  • Use nested groups for OR-then-AND logic; never mix operators at one level.
  • For scheduled policies, combine status/date filters so batch runs do not touch unrelated alerts.
  • After saving, use Run on Creating a policy and verify Alerts Matched.