- Prometheus cluster integrations
- Trigger actions from alerts
Set up alerts for Prometheus metrics
After configuring metrics for your CI/CD environment, you can set up alerting for Prometheus metrics, and trigger actions from alerts to notify your team when environment performance falls outside of the boundaries you set.
Prometheus cluster integrations
Alerts are not supported for Prometheus cluster integrations.
Trigger actions from alerts
- Introduced in GitLab 13.1: incidents are not created automatically by default .
- Mapping common severity values from the alert payload (introduced in GitLab 13.9.
Turn on creating incidents automatically whenever an alert is triggered.
- You must have at least the Maintainer role for the project.
To configure the actions:
- On the top bar, select Main menu > Projects and find your project.
- On the left sidebar, select Settings > Monitor.
- Expand the Alerts section, then select the Alert settings tab.
- Select the Create an incident checkbox.
- Optional. To customize the incident, from the Incident template, select a template to be appended to the incident summary. If the dropdown list is empty, create an issue template first.
- Optional. To send an email notification, select the Send a single email notification to Owners and Maintainers for new alerts checkbox.
- Select Save changes.
Fields in automatically created incidents
Incidents created automatically from an alert are filled with
values extracted from the
alerts field in the
- Incident author:
GitLab Alert Bot
- Incident title: Extracted from the alert payload fields
- Incident description: Extracted from alert payload field
Summary: A list of properties from the alert’s payload.
starts_at: Alert start time from the payload’s
full_query: Alert query extracted from the payload’s
- Optional list of attached annotations extracted from
- Alert GLFM: GitLab Flavored Markdown from the payload’s
Alert severity: Extracted from the alert payload field
labels/severity. Maps case-insensitive value to Alert’s severity:
Alert payload Mapped to alert severity Critical
fatal, or any value not in this list
To further customize the incident, you can add labels, mentions, or any other supported
quick action in the selected issue template,
which applies to all incidents. To limit quick actions or other information to
only specific types of alerts, use the
GitLab tags each incident issue with the
incident label automatically. If the label
does not yet exist, it’s created automatically.
The alert in GitLab is automatically resolved when Prometheus
sends a payload with the field
status set to
You can also configure the associated incident to be closed automatically when the alert resolves.