Skip to content

[FEATURE] hidden receivers in UI/API#5015

Open
cxdy wants to merge 4 commits intoprometheus:mainfrom
cxdy:feat/hidden-receivers
Open

[FEATURE] hidden receivers in UI/API#5015
cxdy wants to merge 4 commits intoprometheus:mainfrom
cxdy:feat/hidden-receivers

Conversation

@cxdy
Copy link
Contributor

@cxdy cxdy commented Feb 16, 2026

Description

This pull request does the following:

  • Adds the ability to "hide" alerts from specific receivers in the UI and API responses
  • Adds a button to the UI to show alerts from "hidden" receivers
  • Adds a URL parameter ?includeHidden=true to show "hidden" receivers in both UI and API responses

This is set in the receivers: block, like this:

receivers:
- name: 'webhook-receiver'
  hidden: true
  webhook_configs:
  - url: 'http://webhook-receiver:8080/alerts'

If unset, it will not be hidden.

Why?

This may be a niche usecase, but in our environment, we have a webhook receiver (internal tool) that is our top-level route, thus it receives every alert that reaches our Alertmanager cluster. This means that all alerts are essentially duplicated in the UI response when hitting the /alerts endpoint.

root@prometheus1:~# curl -s http://127.0.0.1:9093//api/v2/alerts | jq '[.[] | {receiver: .receivers[].name}] | group_by(.receiver) | map({receiver: .[0].receiver, count: length}) | sort_by(-.count) | .[0:1]'
[
  {
    "receiver": "webhook-receiver",
    "count": 8344
  }
]

This makes the UI load a bit slower than we'd like, and other folks use the Alertmanager API for various automations and have been complaining of poor performance due to this (amongst other things).

Checklist

cxdy added 2 commits February 16, 2026 16:56
Signed-off-by: Cody Kaczynski <ckaczyns@akamai.com>
Signed-off-by: Cody Kaczynski <ckaczyns@akamai.com>
@cxdy cxdy force-pushed the feat/hidden-receivers branch from 8438d0a to 80ef37c Compare February 16, 2026 21:57
Signed-off-by: Cody Kaczynski <ckaczyns@akamai.com>
@cxdy cxdy force-pushed the feat/hidden-receivers branch from f30c992 to 4a0354e Compare February 16, 2026 22:03
@cxdy cxdy changed the title [FEATURE] - hidden receivers in UI/API [FEATURE] hidden receivers in UI/API Feb 16, 2026
Pre-compute hidden receivers set on config reload instead of
iterating through all receivers on every isReceiverHidden check.
This improves performance when filtering many alerts.

Signed-off-by: Cody Kaczynski <ckaczyns@akamai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants