Skip to content

alertmanager: retain the cluster name in alert descriptions - #2901

Open
banlor wants to merge 3 commits into
prometheus-operator:mainfrom
banlor:fix/alertmanager-cluster-name
Open

banlor wants to merge 3 commits into
prometheus-operator:mainfrom
banlor:fix/alertmanager-cluster-name

Conversation

@banlor

@banlor banlor commented Oct 3, 2026 •

Copy link
Copy Markdown

Description

The cluster alerts group by namespace and service, so their descriptions have no job label to use. Use namespace/service for the cluster name and regenerate the Alertmanager rules.

For example, the configuration mismatch alert now names monitoring/alertmanager-main. See helm-charts#4872.

AI assistance was used for implementation and verification.

Type of change

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry

Use namespace and service to name the Alertmanager cluster in alert descriptions.

banlor added 2 commits October 3, 2026 22:39
The cluster rules aggregate by namespace and service, removing job from
several firing alerts. Set the cluster-name template to those retained
labels so descriptions identify the cluster consistently.

Add a Jsonnet regression covering all seven cluster descriptions and
custom naming without changing expressions or other alert fields.

Signed-off-by: Mikhail Basov <michael.s.basov@gmail.com>
Regenerate the Alertmanager PrometheusRule with the namespace/service
cluster-name template. Only the seven cluster descriptions change;
expressions and other alert fields stay the same.

Signed-off-by: Mikhail Basov <michael.s.basov@gmail.com>
@banlor
banlor requested a review from a team as a code owner October 3, 2026 17:47
@banlor

banlor commented Nov 6, 2026

Copy link
Copy Markdown
Author

@simonpasquier, could you take a look at this when you have time? It only changes the Alertmanager cluster alert descriptions so that they name the cluster again, with the regenerated manifest and a jsonnet test. CI never ran on it: the workflow was waiting for approval, so it would need a re-run.

@simonpasquier simonpasquier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the test addition isn't quite useful IMHO.

Signed-off-by: Mikhail Basov <michael.s.basov@gmail.com>
@banlor

banlor commented Nov 21, 2026 •

Copy link
Copy Markdown
Author

Dropped the test, thanks. Could you approve the CI run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants