Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 38,034
    • Issues 38,034
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,346
    • Merge requests 1,346
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Merge requests
  • !50871

You need to sign in or sign up before continuing.
Merged
Created Jan 05, 2021 by Peter Leitzen@splattael👶Maintainer5 of 5 tasks completed5/5 tasks

Map common severity values from a Prometheus alert payload

  • Overview 53
  • Commits 7
  • Pipelines 15
  • Changes 4

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 gitlab-com/gl-infra/infrastructure#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
Screenshot_2021-01-21_Alerts___Administrator_manual_prometheus_2_ Screenshot_2021-01-21_Alerts___Administrator_manual_prometheus_1_ Screenshot_from_2021-01-19_19-20-47

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
Edited Jan 26, 2021 by Peter Leitzen
Assignee
Assign to
Reviewer
Request review from
13.9
Milestone
13.9 (Past due)
Assign milestone
Time tracking
Source branch: map-prometheus-payload-severity