[mixin/alerts]: Enable configuring job prefix for alerts to prevent clashes with metrics from Loki/Tempo. #9659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This enables the ability to configure a job prefix for alerts in the mimir-mixin. Currently, some alerts just use a regex that matches any job prefix (e.g.
.+/
or.*/
). This can cause a problem because certain alerts will start triggering because they will match metrics for not just mimir, but also loki/tempo (if present).As a specific example,
GossipMembersTooHigh
andRingMembersMismatch
will start firing if Tempo metrics are being collected, since the current alerts will match not only onjob=mimir/ingester
, but alsojob=tempo/ingester
Typically, users would configure this alert prefix to the namespace mimir is deployed to, e.g. "mimir/".
This is a non-impactful change as it's a new configuration option which defaults to the previous prefix,
.*/
. However, it does change GossipMembersTooHigh from the prefix.+/
to.*/
, but this shouldn't be relevant. Every other alert using this pattern was already using.*/
for the job prefix.Which issue(s) this PR fixes or relates to
Fixes #5260
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.