mirror of https://github.com/grafana/grafana
Alerting: add "about alert rules" section (#49413)
* Alerting: add "about alert rules" section * chore: adds descriptions and keywords * Docs: update image locations * chore: fix typopull/49541/head
parent
3ca3a59079
commit
438898de86
@ -0,0 +1,19 @@ |
||||
+++ |
||||
title = "About alert rules" |
||||
description = "Learn about Grafana alert rules" |
||||
keywords = ["grafana", "alerting", "rules"] |
||||
weight = 101 |
||||
+++ |
||||
|
||||
# About alert rules |
||||
|
||||
An alerting rule is a set of evaluation criteria that determines whether an alert instance will fire. The rule consists of one or more queries and expressions, a condition, the frequency of evaluation, and optionally, the duration over which the condition is met. |
||||
|
||||
While queries and expressions select the data set to evaluate, a condition sets the threshold that an alert must meet or exceed to create an alert. |
||||
|
||||
An interval specifies how frequently an alerting rule is evaluated. Duration, when configured, indicates how long a condition must be met. The alert rules can also define alerting behavior in the absence of data. |
||||
|
||||
- [Alert rule types]({{< relref "./alert-rule-types.md" >}}) |
||||
- [Alert instances]({{< relref "./alert-instances.md" >}}) |
||||
- [Organising alert rules]({{< relref "./organising-alerts.md" >}}) |
||||
- [Annotation and labels]({{< relref "../fundamentals/annotation-label/_index.md" >}}) |
@ -0,0 +1,22 @@ |
||||
+++ |
||||
title = "Alert instances" |
||||
description = "Learn about Grafana alert instances" |
||||
keywords = ["grafana", "alerting", "instances"] |
||||
weight = 103 |
||||
+++ |
||||
|
||||
# Alert instances |
||||
|
||||
Grafana managed alerts support multi-dimensional alerting. Each alert rule can create multiple alert instances. This is exceptionally powerful if you are observing multiple series in a single expression. |
||||
|
||||
Consider the following PromQL expression: |
||||
|
||||
```promql |
||||
sum by(cpu) ( |
||||
rate(node_cpu_seconds_total{mode!="idle"}[1m]) |
||||
) |
||||
``` |
||||
|
||||
A rule using this expression will create as many alert instances as the amount of CPUs we are observing after the first evaluation, allowing a single rule to report the status of each CPU. |
||||
|
||||
{{< figure src="/static/img/docs/alerting/unified/multi-dimensional-alert.png" caption="A multi-dimensional Grafana managed alert rule" >}} |
@ -0,0 +1,30 @@ |
||||
+++ |
||||
title = "Alert rule types" |
||||
description = "Learn about the different alert rule types" |
||||
keywords = ["grafana", "alerting", "rule types"] |
||||
weight = 102 |
||||
+++ |
||||
|
||||
# Alert rule types |
||||
|
||||
Grafana supports several alert rule types, the following sections will explain their merits and demerits and help you choose the right alert type for your use case. |
||||
|
||||
## Grafana managed rules |
||||
|
||||
Grafana-managed rules are the most flexible alert rule type. They allow you to create alerts that can act on data from any of your existing data sources. |
||||
|
||||
In additional to supporting any datasource you can also add additional [expressions]({{< relref "../../panels/query-a-data-source/use-expressions-to-manipulate-data/_index.md" >}}) to transform your data and express alert conditions. |
||||
|
||||
## Mimir, Loki and Cortex rules |
||||
|
||||
To create Mimir, Loki or Cortex alerts you must have a compatible Prometheus data source. You can check if your data source is compatible by testing the data source and checking the details if the ruler API is supported. |
||||
|
||||
{{< figure src="/static/img/docs/alerting/unified/mimir-datasource-check.png" caption="Successfully connected to a Mimir Prometheus datasource" max-width="40%" >}} |
||||
|
||||
## Recording rules |
||||
|
||||
Recording rules are only available for compatible Prometheus data sources like Mimir, Loki and Cortex. |
||||
|
||||
A recording rule allows you to save an expression's result to a new set of time series. This is useful if you want to run alerts on aggregated data or if you have dashboards that query the same expression repeatedly. |
||||
|
||||
Read more about [recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) in Prometheus. |
@ -0,0 +1,22 @@ |
||||
+++ |
||||
title = "Organising alert rules" |
||||
description = "Learn how to organize alert rules" |
||||
keywords = ["grafana", "alerting", "organization"] |
||||
weight = 104 |
||||
+++ |
||||
|
||||
## Namespaces and groups |
||||
|
||||
Alerts can be organized using Folders for Grafana-managed rules and namespaces for Mimir or Loki rules and group names. |
||||
|
||||
### Namespaces |
||||
|
||||
When creating Grafana-managed rules, the folder can be used to perform access control and grant or deny access to all rules within a specific folder. |
||||
|
||||
### Groups |
||||
|
||||
All rules within a group are evaluated at the same **interval**. |
||||
|
||||
Alert rules and recording rules within a group will always be evaluated **sequentially**, meaning no rules will be evaluated at the same time and in order of appearance. |
||||
|
||||
> **Note** If you want rules to be evaluated concurrently and with different intervals, consider storing them in different groups. |
@ -1,21 +0,0 @@ |
||||
+++ |
||||
title = "Label matching and alert suppression" |
||||
description = "Silences alert notifications" |
||||
keywords = ["grafana", "alerting", "silence", "mute"] |
||||
weight = 452 |
||||
aliases = ["/docs/grafana/latest/alerting/unified-alerting/silences/"] |
||||
+++ |
||||
|
||||
# About label matching for alert suppression |
||||
|
||||
Grafana suppresses notifications only for alerts with labels that match all the "Matching Labels" specified in the silence. |
||||
|
||||
- The **Label** field is the name of the label to match. It must exactly match the label name. |
||||
- The **Operator** field is the operator to match against the label value. The available operators are: |
||||
|
||||
- `=`: Select labels that are exactly equal to the provided string. |
||||
- `!=`: Select labels that are not equal to the provided string. |
||||
- `=~`: Select labels that regex-match the provided string. |
||||
- `!~`: Select labels that do not regex-match the provided string. |
||||
|
||||
- The **Value** field matches against the corresponding value for the specified **Label** name. How it matches depends on the **Operator** value. |
Loading…
Reference in new issue