-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mixin dashbaords: add support for ingest storage replication #8175
mixin dashbaords: add support for ingest storage replication #8175
Conversation
Signed-off-by: Dimitar Dimitrov <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice job!
# Classic storage | ||
sum by (%(groupByCluster)s, %(groupByLabels)s) (%(perIngesterQuery)s) | ||
/ on (%(groupByCluster)s) group_left() | ||
max by (%(groupByCluster)s) (cortex_distributor_replication_factor{%(distributor)s}) | ||
or on (%(groupByCluster)s) | ||
# Ingest storage | ||
sum by (%(groupByCluster)s, %(groupByLabels)s) ( | ||
max by (ingester_id, %(groupByCluster)s, %(groupByLabels)s) ( | ||
label_replace( | ||
%(perIngesterQuery)s, | ||
"ingester_id", "$1", "%(instance)s", ".*-([0-9]+)$" | ||
) | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯 Nice :)
Signed-off-by: Dimitar Dimitrov <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
sum by (%(groupByCluster)s, %(groupByLabels)s) (%(perIngesterQuery)s) | ||
/ on (%(groupByCluster)s) group_left() | ||
max by (%(groupByCluster)s) (cortex_distributor_replication_factor{%(distributor)s}) | ||
or on (%(groupByCluster)s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand one thing: what is this on (%(groupByCluster)s)
(in this line) used for?
Isn't the query we want something like:
(
# Classic storage
) or (
# Ingest storage
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah good point. I don't think the on
clause does much. Both sides already have the same set of label names.
Opened #8211
…#8175) Signed-off-by: Dimitar Dimitrov <[email protected]>
What this PR does
Some panels in the dashboards rely on
cortex_distributor_replication_factor
. This metric is not exported if running in ingest storage (#7809).This PR updates all queries in the mixin that were relaying on
cortex_distributor_replication_factor
. If the replication factor metric isn't present now the queries fall back to the maximum of each partition for the metric in question (such ascortex_ingester_active_series
).Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.