Allow generic alerts to set gitlab environment
What does this MR do?
This adds the ability to associate a [non-prometheus] AlertManagement::Alert
with an Environment
.
By providing the gitlab_environment_name
in the Payload, we will attempt to match an environment for the project by the given name, and associate that to the Alert. This variable name matches the existing name we use for Prometheus alerts (https://docs.gitlab.com/ee/operations/metrics/alerts.html#external-prometheus-instances).
Note: Prometheus alerts are already able to be associated via the Prometheus Alert (metric alert), or in External instances using the same key in the labels
object of the alert payload. See https://docs.gitlab.com/ee/operations/metrics/alerts.html#external-prometheus-instances
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Closes #238485 (closed)
Edited by Sean Arnold