info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
---
---
# Generic alerts integration
# Alert integrations
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13203) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.4.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13203) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.4.
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/42640) to [GitLab Core](https://about.gitlab.com/pricing/) in 12.8.
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/42640) to [GitLab Core](https://about.gitlab.com/pricing/) in 12.8.
GitLab can accept alerts from any source via a generic webhook receiver.
GitLab can accept alerts from any source via a webhook receiver. This can be configured generically or, in GitLab versions 13.1 and greater, you can configure
When you set up the generic alerts integration, a unique endpoint will
be created which can receive a payload in JSON format, and will in turn
create an issue with the payload in the body of the issue. You can always
[customize the payload](#customizing-the-payload) to your liking.
The entire payload will be posted in the issue discussion as a comment
authored by the GitLab Alert Bot.
NOTE: **Note:**
In GitLab versions 13.1 and greater, you can configure
To obtain credentials for setting up a generic alerts integration:
### Generic HTTP Endpoint
Enabling the Generic HTTP Endpoint creates a unique HTTP endpoint that can receive alert payloads in JSON format. You can always
[customize the payload](#customizing-the-payload) to your liking.
You will need to activate the endpoint and obtain credentials to set up this integration:
1. Sign in to GitLab as a user with maintainer [permissions](../../user/permissions.md)
1. Sign in to GitLab as a user with maintainer [permissions](../../user/permissions.md)
for a project.
for a project.
1. Navigate to the **Operations** page for your project, depending on your
1. Navigate to **Settings > Operations** in your project.
installed version of GitLab:
1. Expand the **Alerts** section, and in the **Integration** dropdown menu, select **Generic**.
-*In GitLab versions 13.1 and greater,* navigate to **Settings > Operations**
in your project.
-*In GitLab versions prior to 13.1,* navigate to **Settings > Integrations**
in your project. GitLab will display a banner encouraging you to enable
the Alerts endpoint in **Settings > Operations** instead.
1. Click **Alerts endpoint**.
1. Toggle the **Active** alert setting to display the **URL** and **Authorization Key**
1. Toggle the **Active** alert setting to display the **URL** and **Authorization Key**
for the webhook configuration.
for the webhook configuration.
### External Prometheus integration
For GitLab versions 13.1 and greater, please see [External Prometheus Instances](../metrics/alerts.md#external-prometheus-instances) to configure alerts for this integration.
## Customizing the payload
## Customizing the payload
You can customize the payload by sending the following parameters. All fields
You can customize the payload by sending the following parameters. This applies to all types of integrations. All fields
other than `title` are optional:
other than `title` are optional:
| Property | Type | Description |
| Property | Type | Description |
...
@@ -79,7 +72,7 @@ curl --request POST \
...
@@ -79,7 +72,7 @@ curl --request POST \
<url>
<url>
```
```
The `<authorization_key>` and `<url>` values can be found when [setting up generic alerts](#setting-up-generic-alerts).
The `<authorization_key>` and `<url>` values can be found when configuring an alert integration.
Example payload:
Example payload:
...
@@ -105,8 +98,8 @@ Example payload:
...
@@ -105,8 +98,8 @@ Example payload:
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/3066) in GitLab Core in 13.2.
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/3066) in GitLab Core in 13.2.
After a [project maintainer or owner](#setting-up-generic-alerts)
After a [project maintainer or owner](../../user/permissions.md)
[configures generic alerts](#setting-up-generic-alerts), you can trigger a test
configures an integration, you can trigger a test
alert to confirm your integration works properly.
alert to confirm your integration works properly.
1. Sign in as a user with Developer or greater [permissions](../../user/permissions.md).
1. Sign in as a user with Developer or greater [permissions](../../user/permissions.md).