What does this MR do?
This MR adds the ability to map Prometheus specific severity in alert payload located in labels.severity
to GitLab alert severity.
Severity Value Mapping
Severity is matched case-insensitive so one can provide CRITICAL
or iNfO
.
Refs https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/12238
Alertmanager Payload labels/severity
|
Mapped to Alert severity |
---|---|
critical , s1 , p1 , emergency , fatal
|
critical |
high , s2 , p2 , major , page
|
high |
medium , s3 , p3 , error , alert
|
medium |
low , s4 , p4 , warn , warning
|
low |
info , s5 , p5 , debug , information , notice
|
info |
something unmapped |
nil (or critical implicitly¹) |
missing |
nil (or critical implicitly¹) |
¹If a severity is missing or unknown we map to nil
which defaults to critical
(DEFAULT 0
)
Screenshots (strongly suggested)
Before | After | Alert details |
---|---|---|
![]() |
![]() |
![]() |