mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Docs: Refactor contact points section of alerting docs (#49758)
* Initial commit * weight adjustments * Checkin changes.
This commit is contained in:
parent
0f40d2a79d
commit
f5a3ac855d
@ -16,7 +16,7 @@ weight: 100
|
||||
|
||||
Grafana Alerting consists of several individual concepts that are at the core of a flexible and powerful alerting engine.
|
||||
|
||||
This topic explains how to create [alert rules]({{< relref "./about-alert-rules/_index.md" >}}), their relationship with [alert instances]({{< relref "./about-alert-rules/alert-instances.md" >}}) and the various alert rule [states and transitions]({{< relref "./fundamentals/state-and-health.md" >}}), [notification policies]({{< relref "./notifications/_index.md" >}}) and [contact points]({{< relref "./contact-points/_index.md" >}}).
|
||||
This topic explains how to create [alert rules]({{< relref "./fundamentals/alert-rules/_index.md" >}}), their relationship with [alert instances]({{< relref "./fundamentals/alert-rules/alert-instances.md" >}}) and the various alert rule [states and transitions]({{< relref "./fundamentals/state-and-health.md" >}}), [notification policies]({{< relref "./notifications/_index.md" >}}) and [contact points]({{< relref "./contact-points/_index.md" >}}).
|
||||
|
||||
These three individual concepts are the minimum necessities to successfully create alerts and receive notifications.
|
||||
|
||||
|
@ -20,199 +20,11 @@ Use contact points to define how your contacts are notified when an alert fires.
|
||||
|
||||
You can configure Grafana managed contact points as well as contact points for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "../fundamentals/alertmanager.md" >}}).
|
||||
|
||||
## Add a contact point
|
||||
Before you begin, see [About Grafana alerting]({{< relref "../about-alerting.md" >}}) which explains the various components of Grafana alerting. We also recommend that you familiarize yourself with some of the [fundamental concepts]({{< relref "../fundamentals/_index.md" >}}) of Grafana alerting.
|
||||
|
||||
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
|
||||
1. Click **Contact points** to open the page listing existing contact points.
|
||||
1. Click **New contact point**.
|
||||
1. From the **Alertmanager** dropdown, select an Alertmanager. By default, Grafana Alertmanager is selected.
|
||||
1. In **Name**, enter a descriptive name for the contact point.
|
||||
1. From **Contact point type**, select a type and fill out mandatory fields. For example, if you choose email, enter the email addresses. Or if you choose Slack, enter the Slack channel(s) and users who should be contacted.
|
||||
1. Some contact point types, like email or webhook, have optional settings. In **Optional settings**, specify additional settings for the selected contact point type.
|
||||
1. In Notification settings, optionally select **Disable resolved message** if you do not want to be notified when an alert resolves.
|
||||
1. To add another contact point type, click **New contact point type** and repeat steps 6 through 8.
|
||||
1. Click **Save contact point** to save your changes.
|
||||
|
||||
## Edit a contact point
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. Find the contact point to edit, then click **Edit** (pen icon).
|
||||
1. Make any changes and click **Save contact point**.
|
||||
|
||||
## Test a contact point
|
||||
|
||||
For Grafana managed contact points, you can send a test notification which helps verify a contact point is configured correctly.
|
||||
|
||||
To send a test notification:
|
||||
|
||||
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact** points.
|
||||
1. Find the contact point to test, then click **Edit** (pen icon). You can also create a new contact point if needed.
|
||||
1. Click **Test** (paper airplane icon) to open the contact point testing modal.
|
||||
1. Choose whether to send a predefined test notification or choose custom to add your own custom annotations and labels to include in the notification.
|
||||
1. Click **Send test notification** to fire the alert.
|
||||
|
||||
## Delete a contact point
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. Find the contact point to delete, then click **Delete** (trash icon).
|
||||
1. In the confirmation dialog, click **Yes, delete**.
|
||||
|
||||
> **Note:** You cannot delete contact points that are in use by a notification policy. You will have to either delete the [notification policy]({{< relref "../notifications/_index.md" >}}) or update it to use another contact point.
|
||||
|
||||
## Edit Alertmanager global config
|
||||
|
||||
To edit global configuration options for an external Alertmanager, like SMTP server, that is used by default for all email contact types:
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. From the **Alertmanager** drop-down, select an external Alertmanager data source.
|
||||
1. Click the **Edit global config** option.
|
||||
1. Add global configuration settings.
|
||||
1. Click **Save global config** to save your changes.
|
||||
|
||||
> **Note** This option is available only for external Alertmanagers. You can configure some global options for Grafana contact types, like email settings, via [Grafana configuration]({{< relref "../../administration/configuration.md" >}}).
|
||||
|
||||
## List of notifiers supported by Grafana
|
||||
|
||||
| Name | Type | Grafana Alertmanager | Other Alertmanagers |
|
||||
| --------------------------------------------- | ------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| [DingDing](#dingdingdingtalk) | `dingding` | Supported | N/A |
|
||||
| [Discord](#discord) | `discord` | Supported | N/A |
|
||||
| [Email](#email) | `email` | Supported | Supported |
|
||||
| [Google Hangouts Chat](#google-hangouts-chat) | `googlechat` | Supported | N/A |
|
||||
| [Kafka](#kafka) | `kafka` | Supported | N/A |
|
||||
| Line | `line` | Supported | N/A |
|
||||
| Microsoft Teams | `teams` | Supported | N/A |
|
||||
| [Opsgenie](#opsgenie) | `opsgenie` | Supported | Supported |
|
||||
| [Pagerduty](#pagerduty) | `pagerduty` | Supported | Supported |
|
||||
| Prometheus Alertmanager | `prometheus-alertmanager` | Supported | N/A |
|
||||
| [Pushover](#pushover) | `pushover` | Supported | Supported |
|
||||
| Sensu | `sensu` | Supported | N/A |
|
||||
| [Sensu Go](#sensu-go) | `sensugo` | Supported | N/A |
|
||||
| [Slack](#slack) | `slack` | Supported | Supported |
|
||||
| Telegram | `telegram` | Supported | N/A |
|
||||
| Threema | `threema` | Supported | N/A |
|
||||
| VictorOps | `victorops` | Supported | Supported |
|
||||
| [Webhook](#webhook) | `webhook` | Supported | Supported ([different format](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config)) |
|
||||
| [WeCom](#wecom) | `wecom` | Supported | N/A |
|
||||
| [Zenduty](#zenduty) | `webhook` | Supported | N/A |
|
||||
|
||||
### Webhook
|
||||
|
||||
Example JSON body:
|
||||
|
||||
```json
|
||||
{
|
||||
"receiver": "My Super Webhook",
|
||||
"status": "firing",
|
||||
"orgId": 1,
|
||||
"alerts": [
|
||||
{
|
||||
"status": "firing",
|
||||
"labels": {
|
||||
"alertname": "High memory usage",
|
||||
"team": "blue",
|
||||
"zone": "us-1"
|
||||
},
|
||||
"annotations": {
|
||||
"description": "The system has high memory usage",
|
||||
"runbook_url": "https://myrunbook.com/runbook/1234",
|
||||
"summary": "This alert was triggered for zone us-1"
|
||||
},
|
||||
"startsAt": "2021-10-12T09:51:03.157076+02:00",
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"generatorURL": "https://play.grafana.org/alerting/1afz29v7z/edit",
|
||||
"fingerprint": "c6eadffa33fcdf37",
|
||||
"silenceURL": "https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT2%2Cteam%3Dblue%2Czone%3Dus-1",
|
||||
"dashboardURL": "",
|
||||
"panelURL": "",
|
||||
"valueString": "[ metric='' labels={} value=14151.331895396988 ]"
|
||||
},
|
||||
{
|
||||
"status": "firing",
|
||||
"labels": {
|
||||
"alertname": "High CPU usage",
|
||||
"team": "blue",
|
||||
"zone": "eu-1"
|
||||
},
|
||||
"annotations": {
|
||||
"description": "The system has high CPU usage",
|
||||
"runbook_url": "https://myrunbook.com/runbook/1234",
|
||||
"summary": "This alert was triggered for zone eu-1"
|
||||
},
|
||||
"startsAt": "2021-10-12T09:56:03.157076+02:00",
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"generatorURL": "https://play.grafana.org/alerting/d1rdpdv7k/edit",
|
||||
"fingerprint": "bc97ff14869b13e3",
|
||||
"silenceURL": "https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT1%2Cteam%3Dblue%2Czone%3Deu-1",
|
||||
"dashboardURL": "",
|
||||
"panelURL": "",
|
||||
"valueString": "[ metric='' labels={} value=47043.702386305304 ]"
|
||||
}
|
||||
],
|
||||
"groupLabels": {},
|
||||
"commonLabels": {
|
||||
"team": "blue"
|
||||
},
|
||||
"commonAnnotations": {},
|
||||
"externalURL": "https://play.grafana.org/",
|
||||
"version": "1",
|
||||
"groupKey": "{}:{}",
|
||||
"truncatedAlerts": 0,
|
||||
"title": "[FIRING:2] (blue)",
|
||||
"state": "alerting",
|
||||
"message": "**Firing**\n\nLabels:\n - alertname = T2\n - team = blue\n - zone = us-1\nAnnotations:\n - description = This is the alert rule checking the second system\n - runbook_url = https://myrunbook.com\n - summary = This is my summary\nSource: https://play.grafana.org/alerting/1afz29v7z/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT2%2Cteam%3Dblue%2Czone%3Dus-1\n\nLabels:\n - alertname = T1\n - team = blue\n - zone = eu-1\nAnnotations:\nSource: https://play.grafana.org/alerting/d1rdpdv7k/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT1%2Cteam%3Dblue%2Czone%3Deu-1\n"
|
||||
}
|
||||
```
|
||||
|
||||
### Webhook fields
|
||||
|
||||
#### Body
|
||||
|
||||
| Key | Type | Description |
|
||||
| ----------------- | ------------------------- | ------------------------------------------------------------------------------- |
|
||||
| receiver | string | Name of the webhook |
|
||||
| status | string | Current status of the alert, `firing` or `resolved` |
|
||||
| orgId | number | ID of the organization related to the payload |
|
||||
| alerts | array of [alerts](#alert) | Alerts that are triggering |
|
||||
| groupLabels | object | Labels that are used for grouping, map of string keys to string values |
|
||||
| commonLabels | object | Labels that all alarms have in common, map of string keys to string values |
|
||||
| commonAnnotations | object | Annotations that all alarms have in common, map of string keys to string values |
|
||||
| externalURL | string | External URL to the Grafana instance sending this webhook |
|
||||
| version | string | Version of the payload |
|
||||
| groupKey | string | Key that is used for grouping |
|
||||
| truncatedAlerts | number | Number of alerts that were truncated |
|
||||
| title | string | **Will be deprecated soon** |
|
||||
| state | string | **Will be deprecated soon** |
|
||||
| message | string | **Will be deprecated soon** |
|
||||
|
||||
#### Alert
|
||||
|
||||
| Key | Type | Description |
|
||||
| ------------ | ------ | ---------------------------------------------------------------------------------- |
|
||||
| status | string | Current status of the alert, `firing` or `resolved` |
|
||||
| labels | object | Labels that are part of this alert, map of string keys to string values |
|
||||
| annotations | object | Annotations that are part of this alert, map of string keys to string values |
|
||||
| startsAt | string | Start time of the alert |
|
||||
| endsAt | string | End time of the alert, default value when not resolved is `0001-01-01T00:00:00Z` |
|
||||
| valueString | string | Values that triggered the current status |
|
||||
| generatorURL | string | URL of the alert rule in the Grafana UI |
|
||||
| fingerprint | string | The labels fingerprint, alarms with the same labels will have the same fingerprint |
|
||||
| silenceURL | string | URL to silence the alert rule in the Grafana UI |
|
||||
| dashboardURL | string | **Will be deprecated soon** |
|
||||
| panelURL | string | **Will be deprecated soon** |
|
||||
|
||||
#### Removed fields related to dashboards
|
||||
|
||||
Alerts are not coupled to dashboards anymore therefore the fields related to dashboards `dashboardId` and `panelId` have been removed.
|
||||
|
||||
### WeCom
|
||||
|
||||
WeCom contact points need a Webhook URL. These are obtained by setting up a WeCom robot on the corresponding group chat. To obtain a Webhook URL using the WeCom desktop Client please follow these steps:
|
||||
|
||||
1. Click the "..." in the top right corner of a group chat that you want your alerts to be delivered to
|
||||
2. Click "Add Group Robot", select "New Robot" and give your robot a name. Click "Add Robot"
|
||||
3. There should be a Webhook URL in the panel.
|
||||
|
||||
| Setting | Description |
|
||||
| ------- | ------------------ |
|
||||
| Url | WeCom webhook URL. |
|
||||
- [Create contact point]({{< relref "./create-contact-point.md" >}})
|
||||
- [Edit contact point]({{< relref "./edit-contact-point.md" >}})
|
||||
- [Test contact point]({{< relref "./test-contact-point.md" >}})
|
||||
- [Delete contact point]({{< relref "./delete-contact-point.md" >}})
|
||||
- [List of notifiers]({{< relref "./notifiers/_index.md" >}})
|
||||
- [Message templating]({{< relref "./message-templating/_index.md" >}})
|
||||
|
31
docs/sources/alerting/contact-points/create-contact-point.md
Normal file
31
docs/sources/alerting/contact-points/create-contact-point.md
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Add contact point
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Add a contact point
|
||||
|
||||
Use contact points to define how your contacts are notified when an alert fires.
|
||||
|
||||
To add a contact point
|
||||
|
||||
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
|
||||
1. Click **Contact points** to open the page listing existing contact points.
|
||||
1. Click **New contact point**.
|
||||
1. From the **Alertmanager** dropdown, select an Alertmanager. By default, Grafana Alertmanager is selected.
|
||||
1. In **Name**, enter a descriptive name for the contact point.
|
||||
1. From **Contact point type**, select a type and fill out mandatory fields. For example, if you choose email, enter the email addresses. Or if you choose Slack, enter the Slack channel(s) and users who should be contacted.
|
||||
1. Some contact point types, like email or webhook, have optional settings. In **Optional settings**, specify additional settings for the selected contact point type.
|
||||
1. In Notification settings, optionally select **Disable resolved message** if you do not want to be notified when an alert resolves.
|
||||
1. To add another contact point type, click **New contact point type** and repeat steps 6 through 8.
|
||||
1. Click **Save contact point** to save your changes.
|
26
docs/sources/alerting/contact-points/delete-contact-point.md
Normal file
26
docs/sources/alerting/contact-points/delete-contact-point.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Delete a contact point
|
||||
weight: 115
|
||||
---
|
||||
|
||||
## Delete a contact point
|
||||
|
||||
For Grafana managed contact points, you can send a test notification which helps verify a contact point is configured correctly.
|
||||
|
||||
To delete a contact point
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. Find the contact point to delete, then click **Delete** (trash icon).
|
||||
1. In the confirmation dialog, click **Yes, delete**.
|
||||
|
||||
> **Note:** You cannot delete contact points that are in use by a notification policy. You will have to either delete the [notification policy]({{< relref "../notifications/_index.md" >}}) or update it to use another contact point.
|
@ -0,0 +1,26 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Edit contact point
|
||||
weight: 120
|
||||
---
|
||||
|
||||
# Edit Alertmanager global config
|
||||
|
||||
To edit global configuration options for an external Alertmanager, like SMTP server, that is used by default for all email contact types:
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. From the **Alertmanager** drop-down, select an external Alertmanager data source.
|
||||
1. Click the **Edit global config** option.
|
||||
1. Add global configuration settings.
|
||||
1. Click **Save global config** to save your changes.
|
||||
|
||||
> **Note** This option is available only for external Alertmanagers. You can configure some global options for Grafana contact types, like email settings, via [Grafana configuration]({{< relref "../../administration/configuration.md" >}})
|
24
docs/sources/alerting/contact-points/edit-contact-point.md
Normal file
24
docs/sources/alerting/contact-points/edit-contact-point.md
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Edit contact point
|
||||
weight: 105
|
||||
---
|
||||
|
||||
# Edit a contact point
|
||||
|
||||
Use contact points to define how your contacts are notified when an alert fires.
|
||||
|
||||
To edit a contact point
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. Find the contact point to edit, then click **Edit** (pen icon).
|
||||
1. Make any changes and click **Save contact point**.
|
@ -24,41 +24,11 @@ Since most of the contact point fields can be templated, you can create reusable
|
||||
|
||||
The following example shows how to use default templates to render an alert message in Slack. The message title contains a count of alerts that are firing or were resolved. The message body lists the alerts and their status.
|
||||
|
||||
<img src="/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png" width="450px">
|
||||
{{< figure src="/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png" class="docs-image--no-shadow" max-width= "550px" caption="Default template" >}}
|
||||
|
||||
The following example shows the use of a custom template within one of the contact point fields.
|
||||
|
||||
<img src="/static/img/docs/alerting/unified/contact-points-use-template-8-0.png" width="400px">
|
||||
|
||||
### Create a message template
|
||||
|
||||
> **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.
|
||||
|
||||
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. From Alertmanager drop-down, select an external Alertmanager to create and manage templates for the external data source. Otherwise, keep the default option of Grafana.
|
||||
{{< figure max-width="250px" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" caption="Select Alertmanager" >}}
|
||||
1. Click **Add template**.
|
||||
1. In **Name**, add a descriptive name.
|
||||
1. In **Content**, add the content of the template.
|
||||
1. Click **Save template** button at the bottom of the page.
|
||||
<img src="/static/img/docs/alerting/unified/templates-create-8-0.png" width="600px">
|
||||
|
||||
The `define` tag in the Content section assigns the template name. This tag is optional, and when omitted, the template name is derived from the **Name** field. When both are specified, it is a best practice to ensure that they are the same.
|
||||
|
||||
### Edit a message template
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. In the Template table, find the template you want to edit, then click the **Edit** (pen icon).
|
||||
1. Make your changes, then click **Save template**.
|
||||
|
||||
### Delete a message template
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. In the Template table, find the template you want to delete, then click the **Delete** (trash icon).
|
||||
1. In the confirmation dialog, click **Yes, delete** to delete the template.
|
||||
|
||||
Use caution when deleting a template since Grafana does not prevent you from deleting templates that are in use.
|
||||
{{< figure src="/static/img/docs/alerting/unified/contact-points-use-template-8-0.png" class="docs-image--no-shadow" max-width= "550px" caption="Default template" >}}
|
||||
|
||||
### Nested templates
|
||||
|
||||
@ -87,59 +57,6 @@ You can use any of the following built-in template options to embed custom templ
|
||||
| `default.message` | Provides a formatted summary of firing and resolved alerts. |
|
||||
| `teams.default.message` | Similar to `default.messsage`, formatted for Microsoft Teams. |
|
||||
|
||||
### Example of a custom template
|
||||
|
||||
Here's an example of how to use a custom template. You can also use the default template included in the setup.
|
||||
|
||||
Step 1: Configure a template to render a single alert.
|
||||
|
||||
```
|
||||
{{ define "myalert" }}
|
||||
[{{.Status}}] {{ .Labels.alertname }}
|
||||
|
||||
Labels:
|
||||
{{ range .Labels.SortedPairs }}
|
||||
{{ .Name }}: {{ .Value }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt (len .Annotations) 0 }}
|
||||
Annotations:
|
||||
{{ range .Annotations.SortedPairs }}
|
||||
{{ .Name }}: {{ .Value }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt (len .SilenceURL ) 0 }}
|
||||
Silence alert: {{ .SilenceURL }}
|
||||
{{ end }}
|
||||
{{ if gt (len .DashboardURL ) 0 }}
|
||||
Go to dashboard: {{ .DashboardURL }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
Step 2: Configure a template to render entire notification message.
|
||||
|
||||
```
|
||||
{{ define "mymessage" }}
|
||||
{{ if gt (len .Alerts.Firing) 0 }}
|
||||
{{ len .Alerts.Firing }} firing:
|
||||
{{ range .Alerts.Firing }} {{ template "myalert" .}} {{ end }}
|
||||
{{ end }}
|
||||
{{ if gt (len .Alerts.Resolved) 0 }}
|
||||
{{ len .Alerts.Resolved }} resolved:
|
||||
{{ range .Alerts.Resolved }} {{ template "myalert" .}} {{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
Step 3: Add `mymessage` in the notification message field.
|
||||
|
||||
```
|
||||
Alert summary:
|
||||
{{ template "mymessage" . }}
|
||||
```
|
||||
|
||||
### HTML in message templates
|
||||
|
||||
HTML in alerting message templates is escaped. We do not support rendering of HTML in the resulting notification.
|
||||
|
@ -0,0 +1,32 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Create message template
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Create a message template
|
||||
|
||||
You can use message templates to customize notification messages for the contact point types.
|
||||
|
||||
To create a message tempplate:
|
||||
|
||||
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
|
||||
2. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
3. From Alertmanager drop-down, select an external Alertmanager to create and manage templates for the external data source. Otherwise, keep the default option of Grafana.
|
||||
{{< figure max-width="250px" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" caption="Select Alertmanager" >}}
|
||||
4. Click **Add template**.
|
||||
5. In **Name**, add a descriptive name.
|
||||
6. In **Content**, add the content of the template.
|
||||
7. Click **Save template** button at the bottom of the page.
|
||||
<img src="/static/img/docs/alerting/unified/templates-create-8-0.png" width="600px">
|
||||
|
||||
The `define` tag in the Content section assigns the template name. This tag is optional, and when omitted, the template name is derived from the **Name** field. When both are specified, it is a best practice to ensure that they are the same.
|
@ -0,0 +1,24 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Delete message template
|
||||
weight: 110
|
||||
---
|
||||
|
||||
# Edit a message template
|
||||
|
||||
Message templates customize notification messages for the contact point types.
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. In the Template table, find the template you want to delete, then click the **Delete** (trash icon).
|
||||
1. In the confirmation dialog, click **Yes, delete** to delete the template.
|
||||
|
||||
Use caution when deleting a template since Grafana does not prevent you from deleting templates that are in use.
|
@ -0,0 +1,24 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Edit message template
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Edit a message template
|
||||
|
||||
Message templates customize notification messages for the contact point types.
|
||||
|
||||
To edit a message template
|
||||
|
||||
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
|
||||
1. In the Template table, find the template you want to edit, then click the **Edit** (pen icon).
|
||||
1. Make your changes, then click **Save template**.
|
@ -0,0 +1,126 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/template-functions/
|
||||
- /docs/grafana/latest/alerting/message-templating/template-functions/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/template-functions/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Examples of template functions
|
||||
weight: 130
|
||||
---
|
||||
|
||||
# Examples of template functions
|
||||
|
||||
## humanize
|
||||
|
||||
**Template string** `{ humanize $value }`
|
||||
|
||||
**Input** `1234567.0`
|
||||
|
||||
**Expected** `1.235M`
|
||||
|
||||
## humanize1024
|
||||
|
||||
**TemplateString** `{ humanize1024 $value } `
|
||||
|
||||
**Input** `1048576.0`
|
||||
|
||||
**Expected** `1Mi`
|
||||
|
||||
## humanizeDuration
|
||||
|
||||
**TemplateString** `{ humanizeDuration $value }`
|
||||
|
||||
**Input** `899.99`
|
||||
|
||||
**Expected** `14m 59s`
|
||||
|
||||
### humanizePercentage
|
||||
|
||||
**TemplateString** `{ humanizePercentage $value }`
|
||||
|
||||
**Input** `0.1234567`
|
||||
|
||||
**Expected** `12.35%`
|
||||
|
||||
## humanizeTimestamp
|
||||
|
||||
**TemplateString** `{ $value | humanizeTimestamp }`
|
||||
|
||||
**Input** `1435065584.128`
|
||||
|
||||
**Expected** `2015-06-23 13:19:44.128 +0000 UTC`
|
||||
|
||||
## title
|
||||
|
||||
**TemplateString** `{ $value | title }`
|
||||
|
||||
**Input** `aa bb CC`
|
||||
|
||||
**Expected** `Aa Bb Cc`
|
||||
|
||||
### toUpper
|
||||
|
||||
**TemplateString** `{ $value | toUpper }`
|
||||
|
||||
**Input** `aa bb CC`
|
||||
|
||||
**Expected** `AA BB CC`
|
||||
|
||||
### toLower
|
||||
|
||||
**TemplateString** `{ $value | toLower }`
|
||||
|
||||
**Input** `aA bB CC`
|
||||
|
||||
**Expected** `aa bb cc`
|
||||
|
||||
## match
|
||||
|
||||
**TemplateString** `{ match "a+" $labels.instance }`
|
||||
|
||||
**Input** `aa`
|
||||
|
||||
**Expected** `true`
|
||||
|
||||
## reReplaceAll
|
||||
|
||||
**TemplateString** `{{ reReplaceAll "localhost:(.*)" "my.domain:$1" $labels.instance }}`
|
||||
|
||||
**Input** `localhost:3000`
|
||||
|
||||
**Expected** `my.domain:3000`
|
||||
|
||||
### graphLink
|
||||
|
||||
**TemplateString** `{{ graphLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}`
|
||||
|
||||
**Expected** `/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":false,"range":true}]`
|
||||
|
||||
### tableLink
|
||||
|
||||
**TemplateString** `{{ tableLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}`
|
||||
|
||||
**Expected** `/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":true,"range":false}]`
|
||||
|
||||
## args
|
||||
|
||||
**TemplateString** `{{define "x"}}{{.arg0}} {{.arg1}}{{end}}{{template "x" (args 1 "2")}}`
|
||||
|
||||
**Expected** `1 2`
|
||||
|
||||
## externalURL
|
||||
|
||||
**TemplateString** `{ externalURL }`
|
||||
|
||||
**Expected** `http://localhost/path/prefix`
|
||||
|
||||
## pathPrefix
|
||||
|
||||
**TemplateString** `{ pathPrefix }`
|
||||
|
||||
**Expected** `/path/prefix`
|
@ -0,0 +1,67 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Example message template
|
||||
weight: 115
|
||||
---
|
||||
|
||||
# Example of a custom template
|
||||
|
||||
Here's an example of how to use a custom template. You can also use the default template included in the setup.
|
||||
|
||||
Step 1: Configure a template to render a single alert.
|
||||
|
||||
```
|
||||
{{ define "myalert" }}
|
||||
[{{.Status}}] {{ .Labels.alertname }}
|
||||
|
||||
Labels:
|
||||
{{ range .Labels.SortedPairs }}
|
||||
{{ .Name }}: {{ .Value }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt (len .Annotations) 0 }}
|
||||
Annotations:
|
||||
{{ range .Annotations.SortedPairs }}
|
||||
{{ .Name }}: {{ .Value }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt (len .SilenceURL ) 0 }}
|
||||
Silence alert: {{ .SilenceURL }}
|
||||
{{ end }}
|
||||
{{ if gt (len .DashboardURL ) 0 }}
|
||||
Go to dashboard: {{ .DashboardURL }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
Step 2: Configure a template to render entire notification message.
|
||||
|
||||
```
|
||||
{{ define "mymessage" }}
|
||||
{{ if gt (len .Alerts.Firing) 0 }}
|
||||
{{ len .Alerts.Firing }} firing:
|
||||
{{ range .Alerts.Firing }} {{ template "myalert" .}} {{ end }}
|
||||
{{ end }}
|
||||
{{ if gt (len .Alerts.Resolved) 0 }}
|
||||
{{ len .Alerts.Resolved }} resolved:
|
||||
{{ range .Alerts.Resolved }} {{ template "myalert" .}} {{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
Step 3: Add `mymessage` in the notification message field.
|
||||
|
||||
```
|
||||
Alert summary:
|
||||
{{ template "mymessage" . }}
|
||||
```
|
@ -10,6 +10,7 @@ keywords:
|
||||
- contact point
|
||||
- templating
|
||||
title: Template data
|
||||
weight: 120
|
||||
---
|
||||
|
||||
# Template data
|
||||
|
@ -10,6 +10,7 @@ keywords:
|
||||
- contact point
|
||||
- templating
|
||||
title: Template functions
|
||||
weight: 125
|
||||
---
|
||||
|
||||
# Template Functions
|
||||
|
41
docs/sources/alerting/contact-points/notifiers/_index.md
Normal file
41
docs/sources/alerting/contact-points/notifiers/_index.md
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: List of notifiers
|
||||
weight: 130
|
||||
---
|
||||
|
||||
# List of supported notifiers
|
||||
|
||||
The following table lists the notifiers (contact point types) supported by Grafana.
|
||||
|
||||
| Name | Type | Grafana Alertmanager | Other Alertmanagers |
|
||||
| --------------------------------------------- | ------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| [DingDing](#dingdingdingtalk) | `dingding` | Supported | N/A |
|
||||
| [Discord](#discord) | `discord` | Supported | N/A |
|
||||
| [Email](#email) | `email` | Supported | Supported |
|
||||
| [Google Hangouts Chat](#google-hangouts-chat) | `googlechat` | Supported | N/A |
|
||||
| [Kafka](#kafka) | `kafka` | Supported | N/A |
|
||||
| Line | `line` | Supported | N/A |
|
||||
| Microsoft Teams | `teams` | Supported | N/A |
|
||||
| [Opsgenie](#opsgenie) | `opsgenie` | Supported | Supported |
|
||||
| [Pagerduty](#pagerduty) | `pagerduty` | Supported | Supported |
|
||||
| Prometheus Alertmanager | `prometheus-alertmanager` | Supported | N/A |
|
||||
| [Pushover](#pushover) | `pushover` | Supported | Supported |
|
||||
| Sensu | `sensu` | Supported | N/A |
|
||||
| [Sensu Go](#sensu-go) | `sensugo` | Supported | N/A |
|
||||
| [Slack](#slack) | `slack` | Supported | Supported |
|
||||
| Telegram | `telegram` | Supported | N/A |
|
||||
| Threema | `threema` | Supported | N/A |
|
||||
| VictorOps | `victorops` | Supported | Supported |
|
||||
| [Webhook](#webhook) | `webhook` | Supported | Supported ([different format](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config)) |
|
||||
| [WeCom](#wecom) | `wecom` | Supported | N/A |
|
||||
| [Zenduty](#zenduty) | `webhook` | Supported | N/A |
|
@ -0,0 +1,137 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Webhook notifier
|
||||
weight: 105
|
||||
---
|
||||
|
||||
### Webhook
|
||||
|
||||
This topic helps you configure the Webhook notifier. It also discusses that [WeCom]({{< relref "./webhook-notifier/#wecom" >}}) contact points need a Webhook URL.
|
||||
|
||||
Example JSON body:
|
||||
|
||||
```json
|
||||
{
|
||||
"receiver": "My Super Webhook",
|
||||
"status": "firing",
|
||||
"orgId": 1,
|
||||
"alerts": [
|
||||
{
|
||||
"status": "firing",
|
||||
"labels": {
|
||||
"alertname": "High memory usage",
|
||||
"team": "blue",
|
||||
"zone": "us-1"
|
||||
},
|
||||
"annotations": {
|
||||
"description": "The system has high memory usage",
|
||||
"runbook_url": "https://myrunbook.com/runbook/1234",
|
||||
"summary": "This alert was triggered for zone us-1"
|
||||
},
|
||||
"startsAt": "2021-10-12T09:51:03.157076+02:00",
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"generatorURL": "https://play.grafana.org/alerting/1afz29v7z/edit",
|
||||
"fingerprint": "c6eadffa33fcdf37",
|
||||
"silenceURL": "https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT2%2Cteam%3Dblue%2Czone%3Dus-1",
|
||||
"dashboardURL": "",
|
||||
"panelURL": "",
|
||||
"valueString": "[ metric='' labels={} value=14151.331895396988 ]"
|
||||
},
|
||||
{
|
||||
"status": "firing",
|
||||
"labels": {
|
||||
"alertname": "High CPU usage",
|
||||
"team": "blue",
|
||||
"zone": "eu-1"
|
||||
},
|
||||
"annotations": {
|
||||
"description": "The system has high CPU usage",
|
||||
"runbook_url": "https://myrunbook.com/runbook/1234",
|
||||
"summary": "This alert was triggered for zone eu-1"
|
||||
},
|
||||
"startsAt": "2021-10-12T09:56:03.157076+02:00",
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"generatorURL": "https://play.grafana.org/alerting/d1rdpdv7k/edit",
|
||||
"fingerprint": "bc97ff14869b13e3",
|
||||
"silenceURL": "https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT1%2Cteam%3Dblue%2Czone%3Deu-1",
|
||||
"dashboardURL": "",
|
||||
"panelURL": "",
|
||||
"valueString": "[ metric='' labels={} value=47043.702386305304 ]"
|
||||
}
|
||||
],
|
||||
"groupLabels": {},
|
||||
"commonLabels": {
|
||||
"team": "blue"
|
||||
},
|
||||
"commonAnnotations": {},
|
||||
"externalURL": "https://play.grafana.org/",
|
||||
"version": "1",
|
||||
"groupKey": "{}:{}",
|
||||
"truncatedAlerts": 0,
|
||||
"title": "[FIRING:2] (blue)",
|
||||
"state": "alerting",
|
||||
"message": "**Firing**\n\nLabels:\n - alertname = T2\n - team = blue\n - zone = us-1\nAnnotations:\n - description = This is the alert rule checking the second system\n - runbook_url = https://myrunbook.com\n - summary = This is my summary\nSource: https://play.grafana.org/alerting/1afz29v7z/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT2%2Cteam%3Dblue%2Czone%3Dus-1\n\nLabels:\n - alertname = T1\n - team = blue\n - zone = eu-1\nAnnotations:\nSource: https://play.grafana.org/alerting/d1rdpdv7k/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT1%2Cteam%3Dblue%2Czone%3Deu-1\n"
|
||||
}
|
||||
```
|
||||
|
||||
### Webhook fields
|
||||
|
||||
## Body
|
||||
|
||||
| Key | Type | Description |
|
||||
| ----------------- | ------------------------- | ------------------------------------------------------------------------------- |
|
||||
| receiver | string | Name of the webhook |
|
||||
| status | string | Current status of the alert, `firing` or `resolved` |
|
||||
| orgId | number | ID of the organization related to the payload |
|
||||
| alerts | array of [alerts](#alert) | Alerts that are triggering |
|
||||
| groupLabels | object | Labels that are used for grouping, map of string keys to string values |
|
||||
| commonLabels | object | Labels that all alarms have in common, map of string keys to string values |
|
||||
| commonAnnotations | object | Annotations that all alarms have in common, map of string keys to string values |
|
||||
| externalURL | string | External URL to the Grafana instance sending this webhook |
|
||||
| version | string | Version of the payload |
|
||||
| groupKey | string | Key that is used for grouping |
|
||||
| truncatedAlerts | number | Number of alerts that were truncated |
|
||||
| title | string | **Will be deprecated soon** |
|
||||
| state | string | **Will be deprecated soon** |
|
||||
| message | string | **Will be deprecated soon** |
|
||||
|
||||
### Alert
|
||||
|
||||
| Key | Type | Description |
|
||||
| ------------ | ------ | ---------------------------------------------------------------------------------- |
|
||||
| status | string | Current status of the alert, `firing` or `resolved` |
|
||||
| labels | object | Labels that are part of this alert, map of string keys to string values |
|
||||
| annotations | object | Annotations that are part of this alert, map of string keys to string values |
|
||||
| startsAt | string | Start time of the alert |
|
||||
| endsAt | string | End time of the alert, default value when not resolved is `0001-01-01T00:00:00Z` |
|
||||
| valueString | string | Values that triggered the current status |
|
||||
| generatorURL | string | URL of the alert rule in the Grafana UI |
|
||||
| fingerprint | string | The labels fingerprint, alarms with the same labels will have the same fingerprint |
|
||||
| silenceURL | string | URL to silence the alert rule in the Grafana UI |
|
||||
| dashboardURL | string | **Will be deprecated soon** |
|
||||
| panelURL | string | **Will be deprecated soon** |
|
||||
|
||||
### Removed fields related to dashboards
|
||||
|
||||
Alerts are not coupled to dashboards anymore therefore the fields related to dashboards `dashboardId` and `panelId` have been removed.
|
||||
|
||||
## WeCom
|
||||
|
||||
WeCom contact points need a Webhook URL. These are obtained by setting up a WeCom robot on the corresponding group chat. To obtain a Webhook URL using the WeCom desktop Client please follow these steps:
|
||||
|
||||
1. Click the "..." in the top right corner of a group chat that you want your alerts to be delivered to
|
||||
2. Click "Add Group Robot", select "New Robot" and give your robot a name. Click "Add Robot"
|
||||
3. There should be a Webhook URL in the panel.
|
||||
|
||||
| Setting | Description |
|
||||
| ------- | ------------------ |
|
||||
| Url | WeCom webhook URL. |
|
26
docs/sources/alerting/contact-points/test-contact-point.md
Normal file
26
docs/sources/alerting/contact-points/test-contact-point.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/contact-points/message-templating/
|
||||
- /docs/grafana/latest/alerting/message-templating/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
title: Test a contact point
|
||||
weight: 110
|
||||
---
|
||||
|
||||
# Test a contact point
|
||||
|
||||
For Grafana managed contact points, you can send a test notification which helps verify a contact point is configured correctly.
|
||||
|
||||
To send a test notification:
|
||||
|
||||
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact** points.
|
||||
1. Find the contact point to test, then click **Edit** (pen icon). You can also create a new contact point if needed.
|
||||
1. Click **Test** (paper airplane icon) to open the contact point testing modal.
|
||||
1. Choose whether to send a predefined test notification or choose custom to add your own custom annotations and labels to include in the notification.
|
||||
1. Click **Send test notification** to fire the alert.
|
@ -18,7 +18,7 @@ Grafana supports several alert rule types, the following sections will explain t
|
||||
|
||||
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.
|
||||
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
|
||||
|
||||
|
@ -20,7 +20,7 @@ Read and write access to legacy dashboard alerts and Grafana alerts are governed
|
||||
- If there are no dashboard permissions and the dashboard is under a folder, then the rule is linked to this folder and inherits its permissions.
|
||||
- If there are no dashboard permissions and the dashboard is under the General folder, then the rule is linked to the `General Alerting` folder, and the rule inherits the default permissions.
|
||||
|
||||
> **Note:** Since there is no `Keep Last State` option for [`No Data`]({{< relref "alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) in Grafana alerting, this option becomes `NoData` during the legacy rules migration. Option "Keep Last State" for [`Error handling`]({{< relref "alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a [silence]({{< relref "silences/_index.md" >}}) for each alert rule with a duration of 1 year.
|
||||
> **Note:** Since there is no `Keep Last State` option for [`No Data`]({{< relref "../alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) in Grafana alerting, this option becomes `NoData` during the legacy rules migration. Option "Keep Last State" for [`Error handling`]({{< relref "../alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a [silence]({{< relref "../silences/_index.md" >}}) for each alert rule with a duration of 1 year.
|
||||
|
||||
Notification channels are migrated to an Alertmanager configuration with the appropriate routes and receivers. Default notification channels are added as contact points to the default route. Notification channels not associated with any Dashboard alert go to the `autogen-unlinked-channel-recv` route.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user