Alert Conditions
This guide explains how to define alert conditions in OpenObserve using logical operators and grouping rules.
Define Alert Conditions
While creating an alert, you can define multiple conditions to determine when the alert should be triggered. Use logical operators such as AND and OR to combine conditions. These operators allow you to create structured, rule-based logic to control alert evaluation.
To define multiple conditions:
- In the Add Alert view, navigate to the Conditions section.
- Select an operator between AND or OR at the top level. This operator will be applied across all items added at the same level.
- Define an individual condition using a column, an operator, and a value.
- Select + Condition to add more conditions at the same level.
- Select + Condition Group to add a grouped block of conditions. A group has its own operator, independent from the parent group or other groups at the same level.

Note
Each condition group in an alert can include nested groups to build complex logic. However, nesting is limited to a maximum depth of three levels per group. This means you can nest groups within groups, but only up to three levels deep.
This limit ensures that alert logic remains readable and manageable while still allowing sufficient flexibility for advanced use cases.
Example
The configuration shown in the image includes the following conditions:
- The top-level logical operator is
OR. -
There are three items at the top level:
-
A condition:
k8s_namespace_nameequalsdev3 -
A condition group with the
ANDoperator:k8s_clusterequalscommon-devk8s_deployment_nameequalsingress-nginx-controller
-
Another condition group with the
ANDoperator:k8s_pod_nameequalsdev3-openobserve-ingesterk8s_deployment_nameequalsdev3-openobserve-router
How it works
The alert is triggered if any one of these items is true:
k8s_namespace_nameisdev3.- Both
k8s_clusteriscommon-devandk8s_deployment_nameisingress-nginx-controller. - Both
k8s_pod_nameisdev3-openobserve-ingesterandk8s_deployment_nameisdev3-openobserve-router.
Because the top-level operator is OR, only one item must be true for the alert to trigger.