mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Revert "Alerting docs: rework create alert rules definition and topic" (#83328)
This commit is contained in:
@@ -1,142 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- ../contact-points/ # /docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/
|
||||
- ../contact-points/create-contact-point/ # /docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/create-contact-point/
|
||||
- ../contact-points/delete-contact-point/ # /docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/delete-contact-point/
|
||||
- ../contact-points/edit-contact-point/ # /docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/edit-contact-point/
|
||||
- ../contact-points/test-contact-point/ # /docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/test-contact-point/
|
||||
- ../manage-notifications/manage-contact-points/ # /docs/grafana/<GRAFANA_VERSION>/alerting/manage-notifications/manage-contact-points/
|
||||
- create-contact-point/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-contact-point/
|
||||
- ./alerting-rules/
|
||||
- ./alerting-rules/manage-notifications/manage-contact-points/
|
||||
- alerting/manage-notifications/manage-contact-points/configure-integrations/
|
||||
- ./alerting-rules/manage-contact-points/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/
|
||||
description: Configure contact points to define how your contacts are notified when an alert rule fires
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Configure contact points
|
||||
weight: 410
|
||||
---
|
||||
|
||||
# Configure contact points
|
||||
|
||||
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.
|
||||
|
||||
Configure contact point integrations in Grafana to select your preferred communication channel for receiving notifications when your alert rules are firing.
|
||||
|
||||
## Add a contact point
|
||||
|
||||
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. 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. Save your changes.
|
||||
|
||||
## Edit a contact point
|
||||
|
||||
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. 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
|
||||
|
||||
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. 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. Either delete the notification policy or update it to use another contact point.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Test a contact point
|
||||
|
||||
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. 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.
|
||||
|
||||
## 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
|
||||
|
||||
## Configure contact point integrations
|
||||
|
||||
Each contact point 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.
|
||||
|
||||
## List of supported integrations
|
||||
|
||||
| Name | Type |
|
||||
| ------------------------ | ------------------------- |
|
||||
| DingDing | `dingding` |
|
||||
| Discord | `discord` |
|
||||
| Email | `email` |
|
||||
| Google Chat | `googlechat` |
|
||||
| [Grafana Oncall][oncall] | `oncall` |
|
||||
| Hipchat | `hipchat` |
|
||||
| Kafka | `kafka` |
|
||||
| Line | `line` |
|
||||
| Microsoft Teams | `teams` |
|
||||
| Opsgenie | `opsgenie` |
|
||||
| [Pagerduty][pagerduty] | `pagerduty` |
|
||||
| Prometheus Alertmanager | `prometheus-alertmanager` |
|
||||
| Pushover | `pushover` |
|
||||
| Sensu | `sensu` |
|
||||
| Sensu Go | `sensugo` |
|
||||
| Slack | `slack` |
|
||||
| Telegram | `telegram` |
|
||||
| Threema | `threema` |
|
||||
| VictorOps | `victorops` |
|
||||
| [Webhook][webhook] | `webhook` |
|
||||
|
||||
{{% docs/reference %}}
|
||||
[pagerduty]: "/docs/grafana/ -> /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/pager-duty"
|
||||
[pagerduty]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/pager-duty"
|
||||
|
||||
[oncall]: "/docs/grafana/ -> /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-oncall"
|
||||
[oncall]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-oncall"
|
||||
|
||||
[webhook]: "/docs/grafana/ -> /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier"
|
||||
[webhook]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier"
|
||||
{{% /docs/reference %}}
|
||||
@@ -1,74 +0,0 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/integrations/configure-oncall/
|
||||
description: Configure the Alerting - Grafana OnCall integration to connect alerts generated by Grafana Alerting with Grafana OnCall
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- oncall
|
||||
- integration
|
||||
aliases:
|
||||
- ../configure-oncall/ # /docs/grafana/latest/alerting/alerting-rules/manage-contact-points/configure-oncall/
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Grafana OnCall
|
||||
title: Configure Grafana OnCall for Alerting
|
||||
weight: 300
|
||||
---
|
||||
|
||||
## 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.
|
||||
|
||||
You can set up the integration using the Grafana Alerting application or the Grafana OnCall application. For more information on setting it up from the Grafana OnCall application, see [Grafana OnCall documentation][oncall-integration].
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have Installed and enabled the Grafana OnCall plugin
|
||||
- Ensure your version of Grafana is up-to-date and supports the new features
|
||||
|
||||
### Procedure
|
||||
|
||||
To set up the Grafana OnCall integration using the Grafana Alerting application, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts&IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select Grafana OnCall.
|
||||
|
||||
**Note:**
|
||||
|
||||
The Grafana OnCall integration is only available for Grafana Alertmanager.
|
||||
|
||||
1. Choose whether to add a new OnCall integration or add an existing one.
|
||||
|
||||
- If you add a new one, enter an Integration name.
|
||||
- If you add an existing one, choose from the list of available integrations
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
1. On the Contact points list view page, you can see the contact point with the Grafana OnCall icon.
|
||||
|
||||
If the integration is not yet being used anywhere in the notification policies tree, it will have **Unused** as its status in the **Health** column. It won’t receive any notifications, because there are no notifications using that integration.
|
||||
|
||||
1. Connect your contact point to a notification policy.
|
||||
|
||||
For more information on connecting your contact point to a notification policy, see
|
||||
[Create notification policy][create-notification-policy].
|
||||
|
||||
1. To view your integration in the Grafana OnCall application and set up routes and escalation chains, click the Link next to the integration on the Contact points list view page in the **Type** column.
|
||||
|
||||
This redirects you to the Grafana OnCall integration page in the Grafana OnCall application. From there, you can add [routes and escalation chains][escalation-chain].
|
||||
|
||||
{{% docs/reference %}}
|
||||
[create-notification-policy]: "/docs/grafana/ -> /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-notification-policy"
|
||||
[create-notification-policy]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-notification-policy"
|
||||
|
||||
[oncall-integration]: "/docs/grafana/ -> /docs/oncall/latest/integrations/grafana-alerting"
|
||||
[oncall-integration]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/oncall/integrations/grafana-alerting"
|
||||
|
||||
[escalation-chain]: "/docs/grafana/ -> /docs/oncall/latest/configure/escalation-chains-and-routes"
|
||||
[escalation-chain]: "/docs/grafana-cloud/ -> /docs/grafana-cloud/alerting-and-irm/oncall/configure/escalation-chains-and-routes"
|
||||
{{% /docs/reference %}}
|
||||
@@ -1,41 +0,0 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/manage-contact-points/integrations/pager-duty/
|
||||
description: Configure the PagerDuty integration for Alerting
|
||||
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.
|
||||
@@ -1,150 +0,0 @@
|
||||
---
|
||||
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/integrations/webhook-notifier/
|
||||
description: Configure the webhook notifier integration for Alerting
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Webhook notifier
|
||||
title: Configure the webhook notifier for Alerting
|
||||
weight: 200
|
||||
---
|
||||
|
||||
### Configure the webhook notifier for Alerting
|
||||
|
||||
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": "",
|
||||
"values": {
|
||||
"B": 44.23943737541908,
|
||||
"C": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "",
|
||||
"values": {
|
||||
"B": 44.23943737541908,
|
||||
"C": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"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` |
|
||||
| values | object | 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** |
|
||||
| imageURL | string | URL of a screenshot of a panel assigned to the rule that created this notification |
|
||||
|
||||
### 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. |
|
||||
Reference in New Issue
Block a user