From 54faa541c38dea1b6c698c1f03f6aed07fddaf9c Mon Sep 17 00:00:00 2001 From: Pepe Cano <825430+ppcano@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:23:37 +0200 Subject: [PATCH] Alerting docs: Move the `Condition operators` to the Classic condition section (#93997) Alerting docs: Move the `Condition operators` to the Classic conditions section --- .../fundamentals/alert-rule-evaluation/_index.md | 13 ------------- .../fundamentals/alert-rules/queries-conditions.md | 6 ++++++ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/sources/alerting/fundamentals/alert-rule-evaluation/_index.md b/docs/sources/alerting/fundamentals/alert-rule-evaluation/_index.md index ea83debb9dc..5de512dd012 100644 --- a/docs/sources/alerting/fundamentals/alert-rule-evaluation/_index.md +++ b/docs/sources/alerting/fundamentals/alert-rule-evaluation/_index.md @@ -53,19 +53,6 @@ The pending period specifies how long the condition must be met before firing, e You can also set the pending period to zero to skip it and have the alert fire immediately once the condition is met. -## Condition operator - -There are several condition operators available. - -- **and**: Two conditions before and after must be true for the overall condition to be true. -- **or**: If one of conditions before and after are true, the overall condition is true. -- **logic-or**: If the condition before logic-or is true, the overall condition is immediately true, without evaluating subsequent conditions. - -Here are some examples of operators. - -- `TRUE and TRUE or FALSE and FALSE` evaluate to `FALSE`, because last two conditions return `FALSE`. -- `TRUE and TRUE logic-or FALSE and FALSE` evaluate to `TRUE`, because the preceding condition returns `TRUE`. - ## Evaluation example Keep in mind: diff --git a/docs/sources/alerting/fundamentals/alert-rules/queries-conditions.md b/docs/sources/alerting/fundamentals/alert-rules/queries-conditions.md index 9e6ece241e1..a3caf9f1f07 100644 --- a/docs/sources/alerting/fundamentals/alert-rules/queries-conditions.md +++ b/docs/sources/alerting/fundamentals/alert-rules/queries-conditions.md @@ -111,6 +111,12 @@ Classic conditions exist mainly for compatibility reasons and should be avoided Classic condition checks if any time series data matches the alert condition. It always produce one alert instance only, no matter how many time series meet the condition. +| Condition operators | How it works | +| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| and | Two conditions before and after must be true for the overall condition to be true. | +| or | If one of conditions before and after are true, the overall condition is true. | +| logic-or | If the condition before `logic-or` is true, the overall condition is immediately true, without evaluating subsequent conditions. For instance, `TRUE and TRUE logic-or FALSE and FALSE` evaluate to `TRUE`, because the preceding condition returns `TRUE`. | + ## Aggregations Grafana Alerting provides the following aggregation functions to enable you to further refine your query.