Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Documentationbreadcrumb arrow Grafana OnCallbreadcrumb arrow Configure alert behavior for Grafana OnCallbreadcrumb arrow Configure outgoing webhooks for Grafana OnCall
Open source

Configure outgoing webhooks for Grafana OnCall

Outgoing webhooks allow you to send alert details to a specified URL from Grafana OnCall. Once an outgoing webhook is configured, you can use it as a notification method in escalation chains.

To automatically send alert data to a destination URL via outgoing webhook:

  1. In Grafana OnCall, navigate to Outgoing Webhooks and click + Create. This is also the place to edit and delete existing outgoing webhooks.

  2. Provide a name for your outgoing webhook and enter the destination URL.

  3. If the destination requires authentication, enter your credentials. You can enter a username and password (HTTP) or an authorization header formatted in JSON.

  4. Configure the webhook payload in the Data field.

  5. Click Create Webhook.

The format you use to call the variables must match the structure of how the fields are nested in the alert payload. The Data field can use the following four variables to auto-populate the webhook payload with information about the first alert in the alert group:

  • {{ alert_payload }}
  • {{ alert_group_id }}

alert_payload is always the first level of any variable you want to call.

The following is an example of an entry in the Data field that might return an alert name and description.

```json
{
"name": "{{ alert_payload.labels.alertname }}",
"message": "{{ alert_payload.annotations.description }}"
}
```

NOTE: If you receive an error message and cannot create an outgoing webhook, verify that your JSON is formatted correctly.