2022-05-27 12:37:37 -05:00
---
aliases:
2024-03-14 10:58:18 -05:00
- ../../../fundamentals/contact-points/notifiers/webhook-notifier/ # /docs/grafana/< GRAFANA_VERSION > /alerting/fundamentals/contact-points/notifiers/webhook-notifier/
- ../../../fundamentals/contact-points/webhook-notifier/ # /docs/grafana/< GRAFANA_VERSION > /alerting/fundamentals/contact-points/webhook-notifier/
- ../../../manage-notifications/manage-contact-points/webhook-notifier/ # /docs/grafana/< GRAFANA_VERSION > /alerting/manage-notifications/manage-contact-points/webhook-notifier/
2023-06-28 03:38:59 -05:00
- alerting/manage-notifications/manage-contact-points/webhook-notifier/
2024-03-14 10:58:18 -05:00
- ../../../alerting-rules/manage-contact-points/integrations/webhook-notifier/ # /docs/grafana/< GRAFANA_VERSION > /alerting/alerting-rules/manage-contact-points/integrations/webhook-notifier/
2024-02-27 04:56:11 -06:00
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier/
2023-12-12 04:05:20 -06:00
description: Configure the webhook notifier integration for Alerting
2022-05-27 12:37:37 -05:00
keywords:
- grafana
- alerting
- guide
- contact point
- templating
Explicitly set all front matter labels in the source files (#71548)
* Set every page to have defaults of 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration pages to have of 'Cloud', 'Enterprise', and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/enterprise-licensing pages to have 'Enterprise' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/organization-management pages to have 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/provisioning pages to have 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/recorded-queries pages to have labels cloud,enterprise
* Set administration/roles-and-permissions/access-control pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/stats-and-license pages to have labels cloud,enterprise
* Set alerting pages to have labels cloud,enterprise,oss
* Set breaking-changes pages to have labels cloud,enterprise,oss
* Set dashboards pages to have labels cloud,enterprise,oss
* Set datasources pages to have labels cloud,enterprise,oss
* Set explore pages to have labels cloud,enterprise,oss
* Set fundamentals pages to have labels cloud,enterprise,oss
* Set introduction/grafana-cloud pages to have labels cloud
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix introduction pages products
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set panels-visualizations pages to have labels cloud,enterprise,oss
* Set release-notes pages to have labels cloud,enterprise,oss
* Set search pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/audit-grafana pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/configure-authentication pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/configure-authentication/enhanced-ldap pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-authentication/saml pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-request-security pages to have labels cloud,enterprise,oss
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/configure-team-sync pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/export-logs pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set troubleshooting pages to have labels cloud,enterprise,oss
* Set whatsnew pages to have labels cloud,enterprise,oss
* Apply updated labels from review
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-07-18 03:10:12 -05:00
labels:
products:
- cloud
- enterprise
- oss
2023-11-08 06:43:46 -06:00
menuTitle: Webhook notifier
title: Configure the webhook notifier for Alerting
2024-07-17 01:22:47 -05:00
weight: 100
2022-05-27 12:37:37 -05:00
---
2024-05-08 05:49:55 -05:00
# Configure the webhook notifier for Alerting
2022-05-27 12:37:37 -05:00
2024-05-08 05:49:55 -05:00
The webhook notification is a simple way to send information about a state change over HTTP to a custom endpoint. Using this notification you could integrate Grafana into a system of your choosing.
## Webhook JSON payload
2022-05-27 12:37:37 -05:00
```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": "",
2023-05-12 08:40:05 -05:00
"values": {
"B": 44.23943737541908,
"C": 1
}
2022-05-27 12:37:37 -05:00
},
{
"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": "",
2023-05-12 08:40:05 -05:00
"values": {
"B": 44.23943737541908,
"C": 1
}
2022-05-27 12:37:37 -05:00
}
],
"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"
}
```
2024-05-08 05:49:55 -05:00
## Webhook fields
2022-05-27 12:37:37 -05:00
2024-05-08 05:49:55 -05:00
### Body
2022-05-27 12:37:37 -05:00
| 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` |
2023-05-12 08:40:05 -05:00
| values | object | Values that triggered the current status |
2022-05-27 12:37:37 -05:00
| 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** |
2023-05-12 08:40:05 -05:00
| imageURL | string | URL of a screenshot of a panel assigned to the rule that created this notification |
2022-05-27 12:37:37 -05:00
2024-05-08 05:49:55 -05:00
{{< admonition type = "note" > }}
Alert rules are not coupled to dashboards anymore therefore the fields related to dashboards `dashboardId` and `panelId` have been removed.
{{< / admonition > }}
## Procedure
2024-06-25 01:14:16 -05:00
To create your Webhook integration in Grafana Alerting, complete the following steps.
2022-05-27 12:37:37 -05:00
2024-05-08 05:49:55 -05:00
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 **Webhook** .
1. In the **URL** field, copy in your Webhook URL.
1. Click **Test** to check that your integration works.
1. Click **Save contact point** .
2022-05-27 12:37:37 -05:00
2024-05-08 05:49:55 -05:00
## Next steps
2022-05-27 12:37:37 -05:00
2024-06-25 10:52:53 -05:00
The Webhook contact point is ready to receive alert notifications.
2022-05-27 12:37:37 -05:00
2024-06-25 10:52:53 -05:00
To add this contact point to your alert, complete the following steps.
2022-05-27 12:37:37 -05:00
2024-06-25 10:52:53 -05:00
1. In Grafana, navigate to **Alerting** > **Alert rules** .
1. Edit or create a new alert rule.
1. Scroll down to the **Configure labels and notifications** section.
1. Under Notifications, click **Select contact point** .
1. From the drop-down menu, select the previously created contact point.
1. **Click Save rule and exit** .