From 67461086de10fb6ce62534f621258e21fbeea077 Mon Sep 17 00:00:00 2001 From: gotjosh Date: Thu, 2 Dec 2021 15:51:49 +0000 Subject: [PATCH] Docs: Dedicated section for Grouping in Alerting (#42641) * Docs: Dedicated section for Grouping in Alerting * Update docs/sources/alerting/unified-alerting/notification-policies.md Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com> * Update docs/sources/alerting/unified-alerting/notification-policies.md Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com> * Update docs/sources/alerting/unified-alerting/notification-policies.md Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com> * Update docs/sources/alerting/unified-alerting/notification-policies.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/alerting/unified-alerting/notification-policies.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Review suggestions Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com> Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> --- .../unified-alerting/notification-policies.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/sources/alerting/unified-alerting/notification-policies.md b/docs/sources/alerting/unified-alerting/notification-policies.md index 4a92369d7a7..ba1cbf0b638 100644 --- a/docs/sources/alerting/unified-alerting/notification-policies.md +++ b/docs/sources/alerting/unified-alerting/notification-policies.md @@ -11,6 +11,20 @@ Notification policies determine how alerts are routed to contact points. Policie You can configure Grafana managed notification policies as well as notification policies for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "./fundamentals/alertmanager.md" >}}). +## Grouping + +{{< figure max-width="40%" src="/static/img/docs/alerting/unified/notification-policies-grouping.png" max-width="650px" caption="Notification policies grouping" >}} + +Grouping is a new and key concept of Grafana alerting that categorizes alert notifications of similar nature into a single funnel. This allows you to properly route alert notifications during larger outages when many parts of a system fail at once causing a high number of alerts to fire simultaneously. + +For example, suppose you have 100 services connected to a database in different environments. These services are differentiated by the label `env=environmentname`. An alert rule is in place to monitor whether your services can reach the database named `alertname=DatabaseUnreachable`. + +When a network partition occurs, half of your services can no longer reach the database. As a result, 50 different alerts (assuming half of your services) are fired. For this situation, you want to receive a single-page notification (as opposed to 50) with a list of the environments that are affected. + +You can configure grouping to be `group_by: [alertname]` (take note that the `env` label is omitted). With this configuration in place, Grafana sends a single compact notification that has all the affected environments for this alert rule. + +> **Note:** Grafana also has a special label named `...` that you can use to group all alerts by all labels (effectively disabling grouping), therefore each alert will go into its own group. It is different from the default of `group_by: null` where **all** alerts go into a single group. + ## Edit root notification policy > **Note:** Before Grafana v8.2, the configuration of the embedded Alertmanager was shared across organisations. Users of Grafana 8.0 and 8.1 are advised to use the new Grafana 8 Alerts only if they have one organisation. Otherwise, silences for the Grafana managed alerts will be visible by all organizations.