diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-05 21:10:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-05 21:10:31 +0300 |
commit | 8f4d63426a207611f71bc19dae62eb19765a4cf2 (patch) | |
tree | b5843aaef889b0d1305e669404693f11ce414d22 /doc/operations/incident_management | |
parent | cf05fd7f3956f0b1a17caf313e89bb7b3315d947 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/operations/incident_management')
-rw-r--r-- | doc/operations/incident_management/incidents.md | 16 | ||||
-rw-r--r-- | doc/operations/incident_management/integrations.md | 21 |
2 files changed, 32 insertions, 5 deletions
diff --git a/doc/operations/incident_management/incidents.md b/doc/operations/incident_management/incidents.md index 078a1a0be08..d09dbd2cb04 100644 --- a/doc/operations/incident_management/incidents.md +++ b/doc/operations/incident_management/incidents.md @@ -267,3 +267,19 @@ any other Markdown text field in GitLab by You can embed both [GitLab-hosted metrics](../metrics/embed.md) and [Grafana metrics](../metrics/embed_grafana.md) in incidents and issue templates. + +### Automatically close incidents via recovery alerts + +> - [Introduced for Prometheus Integrations](https://gitlab.com/gitlab-org/gitlab/-/issues/13401) in GitLab 12.5. +> - [Introduced for HTTP Integrations](https://gitlab.com/gitlab-org/gitlab/-/issues/13402) in GitLab 13.4. + +With Maintainer or higher [permissions](../../user/permissions.md), you can enable + GitLab to close an incident automatically when a **Recovery Alert** is received: + +1. Navigate to **Settings > Operations > Incidents** and expand **Incidents**. +1. Check the **Automatically close associated Incident** checkbox. +1. Click **Save changes**. + +When GitLab receives a **Recovery Alert**, it closes the associated incident. +This action is recorded as a system message on the incident indicating that it +was closed automatically by the GitLab Alert bot. diff --git a/doc/operations/incident_management/integrations.md b/doc/operations/incident_management/integrations.md index acfab79c0c3..07ffb92a000 100644 --- a/doc/operations/incident_management/integrations.md +++ b/doc/operations/incident_management/integrations.md @@ -97,17 +97,17 @@ to configure alerts for this integration. ## Customize the alert payload outside of GitLab -For all integration types, you can customize the payload by sending the following +For HTTP Endpoints without [custom mappings](#map-fields-in-custom-alerts), you can customize the payload by sending the following parameters. All fields are optional. If the incoming alert does not contain a value for the `Title` field, a default value of `New: Alert` will be applied. | Property | Type | Description | | ------------------------- | --------------- | ----------- | -| `title` | String | The title of the incident. | +| `title` | String | The title of the alert.| | `description` | String | A high-level summary of the problem. | -| `start_time` | DateTime | The time of the incident. If none is provided, a timestamp of the issue is used. | -| `end_time` | DateTime | For existing alerts only. When provided, the alert is resolved and the associated incident is closed. | +| `start_time` | DateTime | The time of the alert. If none is provided, a current time is used. | +| `end_time` | DateTime | The resolution time of the alert. If provided, the alert is resolved. | | `service` | String | The affected service. | -| `monitoring_tool` | String | The name of the associated monitoring tool. | +| `monitoring_tool` | String | The name of the associated monitoring tool. | | `hosts` | String or Array | One or more hosts, as to where this incident occurred. | | `severity` | String | The severity of the alert. Case-insensitive. Can be one of: `critical`, `high`, `medium`, `low`, `info`, `unknown`. Defaults to `critical` if missing or value is not in this list. | | `fingerprint` | String or Array | The unique identifier of the alert. This can be used to group occurrences of the same alert. | @@ -189,6 +189,17 @@ If the existing alert is already `resolved`, GitLab creates a new alert instead. ![Alert Management List](img/alert_list_v13_1.png) +## Recovery alerts + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13402) in GitLab 13.4. + +The alert in GitLab will be automatically resolved when an HTTP Endpoint +receives a payload with the end time of the alert set. For HTTP Endpoints +without [custom mappings](#map-fields-in-custom-alerts), the expected +field is `end_time`. With custom mappings, you can select the expected field. + +You can also configure the associated [incident to be closed automatically](../incident_management/incidents.md#automatically-close-incidents-via-recovery-alerts) when the alert resolves. + ## Link to your Opsgenie Alerts > [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/3066) in GitLab Premium 13.2. |