diff --git a/doc/user/project/integrations/prometheus.md b/doc/user/project/integrations/prometheus.md index 57d4668adaf6423b8ce2593195cc3eb765ded218..785ec29651ff57c6d5fdc9da6f4ec9dcbbff8793 100644 --- a/doc/user/project/integrations/prometheus.md +++ b/doc/user/project/integrations/prometheus.md @@ -131,9 +131,6 @@ will appear, with options to set the threshold and operator. Click **Add** to sa ![Adding an alert](img/prometheus_alert.png) -If the metric exceeds the threshold of the alert for over 5 minutes, an email -will be sent to all [Maintainers and Owners](../../permissions.md#project-members-permissions) of the project. - To remove the alert, click back on the alert icon for the desired metric, and click **Delete**. #### External Prometheus instances @@ -157,6 +154,41 @@ receivers: ... ``` +### Taking action on an alert **[ULTIMATE]** + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/4925) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 11.9. + +Alerts can be used to trigger actions, like open an issue automatically. To configure the actions: + +1. Navigate to your project's **Settings > Operations > Incidents**. +1. Enable the option to create issues. +1. Choose the [issue template](../description_templates.md) to create the issue from. +1. Optionally, select whether to send an email notification to the developers of the project. +1. Click **Save changes**. + +Once enabled, an issue will be opened automatically when an alert is triggered. To further customize the issue, you can add labels, mentions, or any other supported [quick action](../quick_actions.md) in the selected issue template. + +If the metric exceeds the threshold of the alert for over 5 minutes, an email will be sent to all [Maintainers and Owners](../../permissions.md#project-members-permissions) of the project. + +NOTE: **Note:** +If you are running a self-managed instance, the new interface shown on +this page will not be available unless the feature flag +`incident_management` is enabled, which can be done from the Rails console by +instance administrators. + +Use these commands to start the Rails console: + +```sh +# Omnibus GitLab +gitlab-rails console + +# Installation from source +cd /home/git/gitlab +sudo -u git -H bin/rails console RAILS_ENV=production +``` + +Then run `Feature.enable(:incident_management)` to enable the feature flag. + ## Determining the performance impact of a merge > [Introduced][ce-10408] in GitLab 9.2.