Change Prometheus expression to use max function and fix "First Recoverability Point" panel (id 237)#61
Open
jrmclx wants to merge 6 commits into
Open
Change Prometheus expression to use max function and fix "First Recoverability Point" panel (id 237)#61jrmclx wants to merge 6 commits into
jrmclx wants to merge 6 commits into
Conversation
Objective is to fix "First Recoverability Point" panel (id 237) returning "vector cannot contain metrics with the same labelset" error
The panel query was failing with the error "vector cannot contain metrics with the same labelset" when both metrics matched by __name__=~ share the same labelset, because Prometheus drops the __name__ label during vector evaluation, causing a collision.
The fix wraps the selector with max(), which is already used in the equivalent panel elsewhere in the same dashboard (panel id 364). This deduplicates the series and resolves the collision.
Before:
{__name__=~"cnpg_collector_first_recoverability_point|barman_cloud_cloudnative_pg_io_first_recoverability_point",namespace=~"$namespace",pod=~"$instances"}*1000 > 0
After:
max({__name__=~"cnpg_collector_first_recoverability_point|barman_cloud_cloudnative_pg_io_first_recoverability_point",namespace=~"$namespace",pod=~"$instances"})*1000 > 0
Signed-off-by: jrmclx <webmicide@outlook.com>
… to Operator Status regex that did not match operator pod.
fix: WAL health panel false positive on idle databases cloudnative-pg#56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Objective is to fix "First Recoverability Point" panel (id 237) returning "vector cannot contain metrics with the same labelset" error
The panel query was failing with the error "vector cannot contain metrics with the same labelset" when both metrics matched by name=~ share the same labelset, because Prometheus drops the name label during vector evaluation, causing a collision.
The fix wraps the selector with max(), which is already used in the equivalent panel elsewhere in the same dashboard (panel id 364). This deduplicates the series and resolves the collision.
Before:
After: