mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Add CustomDetails field in PagerDuty contact point (#64860)
* Alerting: Add CustomDetails for PagerDuty * fix default value for 'severity' from 'error' to 'critical' * minimal docs for notifiers, specifying config for PagerDuty * replace notifier -> integration * replace notifier -> integration
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
---
|
||||
aliases:
|
||||
- ../contact-points/create-contact-point/
|
||||
- ../contact-points/delete-contact-point/
|
||||
- ../contact-points/edit-contact-point/
|
||||
- ../contact-points/test-contact-point/
|
||||
- ../../contact-points/create-contact-point/
|
||||
- ../../contact-points/delete-contact-point/
|
||||
- ../../contact-points/edit-contact-point/
|
||||
- ../../contact-points/test-contact-point/
|
||||
- ../create-contact-point/
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
@@ -24,10 +25,10 @@ Complete the following steps to add a contact point.
|
||||
|
||||
1. In the left-side menu, click **Alerts & incidents** 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. 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 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. 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.
|
@@ -0,0 +1,68 @@
|
||||
---
|
||||
description: Configure integrations
|
||||
draft: true
|
||||
keywords:
|
||||
- Grafana
|
||||
- alerting
|
||||
- guide
|
||||
- notifications
|
||||
- integrations
|
||||
- contact points
|
||||
title: Configure integrations
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Configure integrations
|
||||
|
||||
Configure integrations in Grafana to select your preferred communication channel for receiving notifications when your alert rules are fire. 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.
|
||||
|
||||
## List of supported integrations
|
||||
|
||||
| Name | Type |
|
||||
| ----------------------- | ------------------------- |
|
||||
| DingDing | `dingding` |
|
||||
| Discord | `discord` |
|
||||
| Email | `email` |
|
||||
| Google Hangouts Chat | `googlechat` |
|
||||
| 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` |
|
||||
|
||||
### 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.
|
Reference in New Issue
Block a user