prometheus / prometheus/alertmanager

FR: sort matchers on silences page

Open
#3,834 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component/ui kind/enhancement
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

Currently matchers are not sorted on "silences" page. I ask to add sorting.

What did you do?
Create 2 silences with matchers:

  1. instance=foo job=myjob alertname=InstanceDown
  2. alertname=InstanceDown instance=bar job=myjob

Go to alertmanager silences page.

What did you expect to see?
Sorted matchers, like this:

  1. alertname=InstanceDown instance=foo job=myjob
  2. alertname=InstanceDown instance=bar job=myjob

What did you see instead? Under which circumstances?
Unsorted matchers:

  1. instance=foo job=myjob alertname=InstanceDown
  2. alertname=InstanceDown instance=bar job=myjob

Environment

  • Alertmanager version:
    0.27.0 (0aa3c2aad14cff039931923ab16b26b7481783b5)

  • Prometheus version:
    2.51.2 (b4c0ab52c3e9b940ab803581ddae9b3d9a452337)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Alertmanager silences page and trace how matchers are displayed. Reproduce the issue by creating the two silences described in the report, then verify that the rendered matchers use a consistent sorted order and that both examples appear as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.