mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting docs: Contact points updates (#77848)
* Alerting docs: adds and reworks contact points content * gh cli to get build to work * contact point docs rework * fixes canonicals with new folder name * adds integrations to index md * deletes pagerduty anchor * ran prettier * updates mute timing section with redesign * Updates alert rules with menu paths and export features * updates menu paths on notification templates tab * updates notification policy with new redesign menu paths * updates time interval tag * ran prettier * corrects typo
This commit is contained in:
parent
e581e8e1f8
commit
9447cb9192
@ -43,7 +43,7 @@ Before Grafana v8.2, the configuration of the embedded Alertmanager was shared a
|
||||
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
|
||||
1. Click **Notification policies**.
|
||||
1. From the **Choose Alertmanager** dropdown, select an external Alertmanager. By default, the **Grafana Alertmanager** is selected.
|
||||
1. In the Root policy section, click **Edit**.
|
||||
1. In the Default policy section, click **...** -> **Edit**.
|
||||
1. In **Default contact point**, update the contact point to whom notifications should be sent for rules when alert rules do not match any specific policy.
|
||||
1. In **Group by**, choose labels to group alerts by. If multiple alerts are matched for this policy, then they are grouped by these labels. A notification is sent per group. If the field is empty (default), then all notifications are sent in a single group. Use a special label `...` to group alerts by all labels (which effectively disables grouping).
|
||||
1. In **Timing options**, select from the following options:
|
||||
@ -75,13 +75,13 @@ To create a new notification policy, you need to follow its tree structure. New
|
||||
1. Click **+ Add nested policy**, then add the details using information in [Add new specific policy](#add-new-nested-policy).
|
||||
1. Click **Save policy** to save your changes.
|
||||
|
||||
## Edit specific policy
|
||||
## Edit notification policies
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM**, and then **Alerting**.
|
||||
1. Click **Notification policies**.
|
||||
1. Find the policy you want to edit, then click **Edit**.
|
||||
1. Find the policy you want to edit, then click **...** -> **Edit**.
|
||||
1. Make any changes using instructions in [Add new specific policy](#add-new-nested-policy).
|
||||
1. Click **Save policy**.
|
||||
1. Save your changes.
|
||||
|
||||
## Searching for policies
|
||||
|
||||
|
@ -26,7 +26,7 @@ weight: 410
|
||||
|
||||
# Configure contact points
|
||||
|
||||
Use contact points to define how your contacts are notified when an alert rule fires. You can create, edit, delete, and test a contact point.
|
||||
Use contact points to define how your contacts are notified when an alert rule fires. You can add, edit, delete, and test a contact point.
|
||||
|
||||
## Add a contact point
|
||||
|
||||
@ -35,13 +35,13 @@ Complete the following steps to add a contact point.
|
||||
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
|
||||
1. Click **Contact points**.
|
||||
1. From the **Choose Alertmanager** dropdown, select an Alertmanager. By default, **Grafana Alertmanager** is selected.
|
||||
1. Click **+ Add contact point**.
|
||||
1. In **Name**, enter a descriptive name for the contact point.
|
||||
1. On the **Contact Points** tab, click **+ Add contact point**.
|
||||
1. Enter a descriptive name for the contact point.
|
||||
1. From **Integration**, 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 integrations, like email or webhook, have optional settings. In **Optional settings**, specify additional settings for the selected contact point integration.
|
||||
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 integration, click **Add contact point integration** and repeat steps 6 through 8.
|
||||
1. Click **Save contact point** to save your changes.
|
||||
1. Save your changes.
|
||||
|
||||
## Edit a contact point
|
||||
|
||||
@ -49,8 +49,8 @@ Complete the following steps to edit a contact point.
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
|
||||
1. Click **Contact points** to view a list of existing contact points.
|
||||
1. Find the contact point to edit, and then click **Edit** (pen icon).
|
||||
1. Make any changes and click **Save contact point**.
|
||||
1. On the **Contact Points** tab, find the contact point you want to edit, and then click **Edit**.
|
||||
1. Update the contact point and save your changes.
|
||||
|
||||
## Delete a contact point
|
||||
|
||||
@ -58,11 +58,11 @@ Complete the following steps to delete a contact point.
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
|
||||
1. Click **Contact points** to view a list of existing contact points.
|
||||
1. Find the contact point to delete, and then click **Delete** (trash icon).
|
||||
1. On the **Contact Points** tab, find the contact point you want to delete, and then click **More** -> **Delete**.
|
||||
1. In the confirmation dialog, click **Yes, delete**.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
You cannot delete contact points that are in use by a notification policy. You will have to either delete the notification policy or update it to use another contact point.
|
||||
You cannot delete contact points that are in use by a notification policy. Either delete the notification policy or update it to use another contact point.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Test a contact point
|
||||
@ -71,7 +71,7 @@ Complete the following steps to test a contact point.
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
|
||||
1. Click **Contact points** to view a list of existing 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. On the **Contact Points** tab, find the contact point you want to test, then click **Edit**. You can also create a new contact point if needed.
|
||||
1. Click **Test** 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.
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
aliases:
|
||||
- alerting/manage-notifications/manage-contact-points/configure-integrations/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/configure-integrations/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/integrations/
|
||||
description: Configure integrations
|
||||
keywords:
|
||||
- Grafana
|
||||
@ -15,13 +15,13 @@ labels:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Configure integrations
|
||||
title: Configure contact point integrations
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Configure integrations
|
||||
# Configure contact point integrations
|
||||
|
||||
Configure integrations in Grafana to select your preferred communication channel for receiving notifications when your alert rules are firing. Each integration has its own configuration options and setup process. In most cases, this involves providing an API key or a Webhook URL.
|
||||
Configure contact point integrations in Grafana to select your preferred communication channel for receiving notifications when your alert rules are firing. Each integration has its own configuration options and setup process. In most cases, this involves providing an API key or a Webhook URL.
|
||||
|
||||
Once configured, you can use integrations as part of your contact points to receive notifications whenever your alert changes its state. In this section, we'll cover the basic steps to configure your integrations, so you can start receiving real-time alerts and stay on top of your monitoring data.
|
||||
|
||||
@ -38,7 +38,7 @@ Once configured, you can use integrations as part of your contact points to rece
|
||||
| Line | `line` |
|
||||
| Microsoft Teams | `teams` |
|
||||
| Opsgenie | `opsgenie` |
|
||||
| [Pagerduty](#pagerduty) | `pagerduty` |
|
||||
| Pagerduty | `pagerduty` |
|
||||
| Prometheus Alertmanager | `prometheus-alertmanager` |
|
||||
| Pushover | `pushover` |
|
||||
| Sensu | `sensu` |
|
||||
@ -48,28 +48,3 @@ Once configured, you can use integrations as part of your contact points to rece
|
||||
| Threema | `threema` |
|
||||
| VictorOps | `victorops` |
|
||||
| Webhook | `webhook` |
|
||||
|
||||
### PagerDuty
|
||||
|
||||
To set up PagerDuty, provide an integration key.
|
||||
|
||||
| Setting | Description |
|
||||
| --------------- | ------------------------------------------------------ |
|
||||
| Integration Key | Integration key for PagerDuty |
|
||||
| Severity | Level for dynamic notifications, default is `critical` |
|
||||
| Custom Details | Additional details about the event |
|
||||
|
||||
The `CustomDetails` field is an object containing arbitrary key-value pairs. The user-defined details are merged with the ones we use by default.
|
||||
|
||||
Our default values for `CustomDetails` are:
|
||||
|
||||
```go
|
||||
{
|
||||
"firing": `{{ template "__text_alert_list" .Alerts.Firing }}`,
|
||||
"resolved": `{{ template "__text_alert_list" .Alerts.Resolved }}`,
|
||||
"num_firing": `{{ .Alerts.Firing | len }}`,
|
||||
"num_resolved": `{{ .Alerts.Resolved | len }}`,
|
||||
}
|
||||
```
|
||||
|
||||
In case of duplicate keys, the user-defined details overwrite the default ones.
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/configure-oncall/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/integrations/configure-oncall/
|
||||
description: Configure the Alerting - Grafana OnCall integration
|
||||
keywords:
|
||||
- grafana
|
||||
@ -11,11 +11,12 @@ labels:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Configure Grafana OnCall integration
|
||||
menuTitle: Grafana OnCall
|
||||
title: Configure Grafana OnCall for Alerting
|
||||
weight: 300
|
||||
---
|
||||
|
||||
## Grafana OnCall integration for Alerting
|
||||
## Configure Grafana OnCall for Alerting
|
||||
|
||||
Use the Grafana Alerting - Grafana OnCall integration to effortlessly connect alerts generated by Grafana Alerting with Grafana OnCall, where you can then route them according to defined escalation chains and schedules.
|
||||
|
@ -0,0 +1,41 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/integrations/pager-duty/
|
||||
description: Configure PagerDuty
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- pagerduty
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: PagerDuty
|
||||
title: Configure PagerDuty for Alerting
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Configure PagerDuty for Alerting
|
||||
|
||||
To set up PagerDuty, provide an integration key.
|
||||
|
||||
| Setting | Description |
|
||||
| --------------- | ------------------------------------------------------ |
|
||||
| Integration Key | Integration key for PagerDuty |
|
||||
| Severity | Level for dynamic notifications, default is `critical` |
|
||||
| Custom Details | Additional details about the event |
|
||||
|
||||
The `CustomDetails` field is an object containing arbitrary key-value pairs. The user-defined details are merged with the ones we use by default.
|
||||
|
||||
Our default values for `CustomDetails` are:
|
||||
|
||||
```go
|
||||
{
|
||||
"firing": `{{ template "__text_alert_list" .Alerts.Firing }}`,
|
||||
"resolved": `{{ template "__text_alert_list" .Alerts.Resolved }}`,
|
||||
"num_firing": `{{ .Alerts.Firing | len }}`,
|
||||
"num_resolved": `{{ .Alerts.Resolved | len }}`,
|
||||
}
|
||||
```
|
||||
|
||||
In case of duplicate keys, the user-defined details overwrite the default ones.
|
@ -3,7 +3,7 @@ aliases:
|
||||
- ../contact-points/notifiers/webhook-notifier/
|
||||
- ../fundamentals/contact-points/webhook-notifier/
|
||||
- alerting/manage-notifications/manage-contact-points/webhook-notifier/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/webhook-notifier/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/integrations/webhook-notifier/
|
||||
description: Configure the webhook notifier for notifications
|
||||
keywords:
|
||||
- grafana
|
||||
@ -16,11 +16,12 @@ labels:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Configure the webhook notifier
|
||||
menuTitle: Webhook notifier
|
||||
title: Configure the webhook notifier for Alerting
|
||||
weight: 200
|
||||
---
|
||||
|
||||
### Configure the webhook notifier
|
||||
### Configure the webhook notifier for Alerting
|
||||
|
||||
Example JSON body:
|
||||
|
@ -0,0 +1,34 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/manage-notifications/manage-contact-points/
|
||||
description: Manage contact points
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- contact points
|
||||
- search
|
||||
- export
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Manage contact points
|
||||
weight: 410
|
||||
---
|
||||
|
||||
# Manage contact points
|
||||
|
||||
The Contact points list view lists all existing contact points and notification templates.
|
||||
|
||||
On the **Contact Points** tab, you can:
|
||||
|
||||
- Search for name and type of contact points and integrations
|
||||
- View all existing contact points and integrations
|
||||
- View how many notification policies each contact point is being used for and navigate directly to the linked notification policies
|
||||
- View the status of notification deliveries
|
||||
- Export individual contact points or all contact points in JSON, YAML, or Terraform format
|
||||
- Delete contact points that are not in use by a notification policy
|
||||
|
||||
On the **Notification templates** tab, you can:
|
||||
|
||||
- View, edit, copy or delete existing notification templates
|
@ -37,23 +37,22 @@ The following table highlights the key differences between mute timings and sile
|
||||
| Uses time interval definitions that can reoccur | Has a fixed start and end time |
|
||||
| Is created and then added to notification policies | Uses labels to match against an alert to determine whether to silence or not |
|
||||
|
||||
## Create a mute timing
|
||||
## Add mute timings
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM**, and then **Alerting**.
|
||||
1. Click **Notification policies**.
|
||||
1. Click **Notification policies** and then the **Mute Timings** tab.
|
||||
1. From the **Alertmanager** dropdown, select an external Alertmanager. By default, the **Grafana Alertmanager** is selected.
|
||||
1. Scroll down to the Mute timings section.
|
||||
1. Click **+ Add mute timing**.
|
||||
1. Fill out the form to create a [time interval](#time-intervals) to match against for your mute timing.
|
||||
1. Click **Submit** to create the mute timing.
|
||||
1. Save your mute timing.
|
||||
|
||||
## Add mute timing to a notification policy
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM**, and then **Alerting**.
|
||||
1. Click **Notification policies**.
|
||||
1. Identify the notification policy you would like to add the mute timing to and click the **Edit** button for that policy.
|
||||
1. In the Specific routing section, from the **Mute timings** dropdown, select the mute timings you would like to add to the route.
|
||||
1. Click **Save policy**.
|
||||
1. Click **Notification policies** and make sure you are on the **Notification Policies** tab.
|
||||
1. Find the notification policy you would like to add the mute timing to and click **...** -> **Edit**.
|
||||
1. From the **Mute timings** dropdown, choose the mute timings you would like to add to the policy.
|
||||
1. Save your changes.
|
||||
|
||||
## Time intervals
|
||||
|
||||
|
@ -26,29 +26,28 @@ You can add one or more templates to your notification template.
|
||||
|
||||
Your notification template name must be unique. You cannot have two templates with the same name in the same notification template or in different notification templates. Avoid defining templates with the same name as default templates, such as: `__subject`, `__text_values_list`, `__text_alert_list`, `default.title` and `default.message`.
|
||||
|
||||
In the Contact points tab, you can see a list of your notification templates.
|
||||
To create a notification template, complete the following steps.
|
||||
|
||||
To create a template, complete the following steps.
|
||||
1. Click **Alerts & IRM** -> **Contact points**.
|
||||
1. Click the **Notification Templates** tab and then **+ Add notification template**.
|
||||
|
||||
1. Click **Add template**.
|
||||
1. Enter a name for the notification template.
|
||||
|
||||
2. Choose a name for the notification template.
|
||||
1. Write the content of the template in the content field.
|
||||
|
||||
3. Write the content of the template in the content field.
|
||||
|
||||
4. Click **Save**.
|
||||
1. Save your changes.
|
||||
|
||||
`{{ define "email.subject" }}` and `{{ end }}` is automatically added to the start and end of the content:
|
||||
|
||||
To create a notification template that contains more than one template:
|
||||
|
||||
1. Click **Add Template**.
|
||||
1. Click **+ Add notification template**.
|
||||
|
||||
2. Enter a name for the notification template.
|
||||
|
||||
3. Write each template in the Content field, including `{{ define "name-of-template" }}` and `{{ end }}` at the start and end of each template.
|
||||
|
||||
4. Click **Save**.
|
||||
4. Save your changes.
|
||||
|
||||
## Preview notification templates
|
||||
|
||||
@ -58,33 +57,33 @@ Preview how your notification templates will look before using them in your cont
|
||||
|
||||
To preview your notification templates:
|
||||
|
||||
1. Navigate to **Alerts&IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+Add template** or edit an existing template.
|
||||
1. Navigate to **Alerts&IRM** -> **Alerting** -> **Contact points** -> **Notification Templates**.
|
||||
1. Click **+ Add notification template** or edit an existing template.
|
||||
1. Add or update your template content.
|
||||
|
||||
Default data is provided and you can add or edit alert data to it as well as alert instances. You can add alert data directly in the Payload data window itself or click **Choose alert instances** or **Add alert data**.
|
||||
Default data is provided and you can add or edit alert data to it as well as alert instances. You can add alert data directly in the Payload data window itself or click **Select alert instances** or **Add custom alerts**.
|
||||
|
||||
1. [Optional] To add alert data from existing alert instances:
|
||||
|
||||
a. Click **Choose alert instances**.
|
||||
a. Click **Select alert instances**.
|
||||
|
||||
b. Hover over the alert instances to view more information on each alert instance.
|
||||
|
||||
c. Click **Confirm** to add the alert instance(s) to the payload.
|
||||
|
||||
1. [Optional] To add alert data using the Alert data editor, click **Add alert data:**
|
||||
1. [Optional] To add alert data using the Alert data editor, click **Add custom data:**
|
||||
|
||||
a. Add annotations, custom labels and/or set a dashboard or a panel.
|
||||
|
||||
b. Toggle Firing/resolved depending on whether you want to add firing or resolved alerts to your notification.
|
||||
|
||||
c. Click **Add alert data to payload**.
|
||||
c. Click **Add alert data**.
|
||||
|
||||
d. Click **Refresh preview** to see what your template content will look like and the corresponding payload data.
|
||||
|
||||
If there are any errors in your template, they are displayed in the Preview and you can correct them before saving.
|
||||
|
||||
1. Click **Save.**
|
||||
1. Save your changes.
|
||||
|
||||
## Template the subject of an email
|
||||
|
||||
|
@ -40,8 +40,8 @@ When managing large volumes of alerts, you can use extended alert rule search ca
|
||||
|
||||
To view alerting details:
|
||||
|
||||
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page. By default, the List view displays.
|
||||
1. In **View as**, toggle between Grouped or State views by clicking the relevant option. See [Grouped view](#grouped-view) and [State view](#state-view) for more information.
|
||||
1. Click **Alerts & IRM** -> **Alert rules**. By default, the List view displays.
|
||||
1. In **View as**, toggle between Grouped, List, or State views by clicking the relevant option. See [Grouped view](#grouped-view) and [State view](#state-view) for more information.
|
||||
1. Expand the rule row to view the rule labels, annotations, data sources the rule queries, and a list of alert instances resulting from this rule.
|
||||
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-details-8-0.png" max-width="650px" caption="Alerting rule details" >}}
|
||||
@ -50,9 +50,11 @@ From the Alert list page, you can also make copies of alert rules to help you re
|
||||
|
||||
## Export alert rules
|
||||
|
||||
Click **Export** to create and tune an alert rule in the UI, then export to YAML or JSON, and use in the provisioning API or files. You can also export an entire rule group to review or use.
|
||||
Click the **Export rule group** icon next to each alert rule group to export to YAML, JSON, or Terraform.
|
||||
|
||||
**Note:** This is supported in both the UI and provisioning API.
|
||||
Click **More** -> **Export all Grafana-managed rules** to export all Grafana-managed alert rules to YAML, JSON, or Terraform.
|
||||
|
||||
Click **More** -> **Modify export** next to each individual alert rule within a group to edit provisioned alert rules and export a modified version.
|
||||
|
||||
## View query definitions for provisioned alerts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user