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.
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_name
equalsdev3
-
A condition group with the
AND
operator:k8s_cluster
equalscommon-dev
k8s_deployment_name
equalsingress-nginx-controller
-
Another condition group with the
AND
operator:k8s_pod_name
equalsdev3-openobserve-ingester
k8s_deployment_name
equalsdev3-openobserve-router
How it works
The alert is triggered if any one of these items is true:
k8s_namespace_name
isdev3
.- Both
k8s_cluster
iscommon-dev
andk8s_deployment_name
isingress-nginx-controller
. - Both
k8s_pod_name
isdev3-openobserve-ingester
andk8s_deployment_name
isdev3-openobserve-router
.
Because the top-level operator is OR
, only one item must be true for the alert to trigger.