Skip to content

GitLab Next

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

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
Time tracking
Source branch: map-prometheus-payload-severity

Enable Gitpod?

To use Gitpod you must first enable the feature in the integrations section of your user preferences.

Cancel Enable Gitpod