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
monitoring/grafana: Replace missing legendFormat warning with error. #44332
Conversation
@@ -344,7 +344,7 @@ local addStyle(alias, colorMode, colors, dateFormat, decimals, mappingType, patt | |||
local RbdDetailsPanel(title, formatY1, expr1, expr2, x, y, w, h) = | |||
graphPanelSchema({}, title, '', 'null as zero', false, formatY1, formatY1, null, null, 0, 1, '$Datasource') | |||
.addTargets( | |||
[addTargetSchema(expr1, 1, 'time_series', 'Write'),addTargetSchema(expr2, 1, 'time_series', 'Read')]) + {gridPos: {x: x, y: y, w: w, h: h}}; | |||
[addTargetSchema(expr1, 1, 'time_series', '{{pool}} Write'),addTargetSchema(expr2, 1, 'time_series', '{{pool}} Read')]) + {gridPos: {x: x, y: y, w: w, h: h}}; |
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 added this because it conflicts with rbd-overview.json
. If I understood it correctly, rbd-details provides metrics for each rbd pool so I thought that {{pool}} would be more specific and therefore make this work? @aaSharma14 you know more about this, what do you think.
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.
@aaSharma14 ping
[addTargetSchema('(ceph_pool_compress_under_bytes / ceph_pool_compress_bytes_used > 0) and on(pool_id) (((ceph_pool_compress_under_bytes > 0) / ceph_pool_stored_raw) * 100 > 0.5)', 1, 'table', 'A'), | ||
addTargetSchema('ceph_pool_max_avail * on(pool_id) group_left(name) ceph_pool_metadata', 1, 'table', 'B'), | ||
addTargetSchema('((ceph_pool_compress_under_bytes > 0) / ceph_pool_stored_raw) * 100', 1, 'table', 'C'), | ||
addTargetSchema('(ceph_pool_percent_used * on(pool_id) group_left(name) ceph_pool_metadata)', 1, 'table', 'D'), | ||
addTargetSchema('(ceph_pool_compress_under_bytes - ceph_pool_compress_bytes_used > 0)', 1, 'table', 'E'), |
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.
Here since tables don't care about the legend format I added these legendFormat arbitrarily.
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.
Maybe in a follow-up PR we should add a meaningful name for legendFormat in all tables: AFAIK this is displayed when you explore the table details.
@@ -634,8 +634,7 @@ local addStyle(alias, colorMode, colors, dateFormat, decimals, mappingType, patt | |||
{"Non-Encrypted": "#E5AC0E"}, '', 'OSD Objectstore Types' | |||
) | |||
.addTarget(addTargetSchema('count(ceph_bluefs_wal_total_bytes)', 1, 'time_series', 'bluestore')) | |||
.addTarget(addTargetSchema('count(ceph_osd_metadata) - count(ceph_bluefs_wal_total_bytes)', 1, 'time_series', 'filestore')) | |||
.addTarget(addTargetSchema('absent(ceph_bluefs_wal_total_bytes)*count(ceph_osd_metadata)', 1, 'time_series', 'filestore')) + {gridPos: {x: 4, y: 8, w: 4, h: 8}}, | |||
.addTarget(addTargetSchema('count(ceph_osd_metadata) - count(ceph_bluefs_wal_total_bytes)', 1, 'time_series', 'filestore')) + {gridPos: {x: 4, y: 8, w: 4, h: 8}}, |
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.
There were 2 filestore counts? I removed one that wasn't correct.
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.
Are you sure? I have no clue about what this was for... :S Maybe @pcuzner recalls...
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.
@pcuzner ping
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.
@epuertat
I deleted the wrong one :PPPPPP . In ceph-dev
with 5 filestore osds you can see the output of both of the queries.
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.
fixed in last commit
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
@@ -171,7 +171,8 @@ def run_promtool(self): | |||
|
|||
for variable, value in self.variables.items(): | |||
expr = self.promql_expr_test.expr | |||
new_expr = re.sub(r'\${0}'.format(variable), str(value), expr) | |||
regex = fr'\${variable}(?=\W)' |
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.
Why the positive look-ahead? What exactly are you trying to match/not to match here? You could express that as a doctest (you'd need to extract part of this function and isolate the string processing code).
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.
The positive lookahead is because I don't want to replace that part, but I need it to make a match.
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.
@epuertat ping
@@ -634,8 +634,7 @@ local addStyle(alias, colorMode, colors, dateFormat, decimals, mappingType, patt | |||
{"Non-Encrypted": "#E5AC0E"}, '', 'OSD Objectstore Types' | |||
) | |||
.addTarget(addTargetSchema('count(ceph_bluefs_wal_total_bytes)', 1, 'time_series', 'bluestore')) | |||
.addTarget(addTargetSchema('count(ceph_osd_metadata) - count(ceph_bluefs_wal_total_bytes)', 1, 'time_series', 'filestore')) | |||
.addTarget(addTargetSchema('absent(ceph_bluefs_wal_total_bytes)*count(ceph_osd_metadata)', 1, 'time_series', 'filestore')) + {gridPos: {x: 4, y: 8, w: 4, h: 8}}, | |||
.addTarget(addTargetSchema('count(ceph_osd_metadata) - count(ceph_bluefs_wal_total_bytes)', 1, 'time_series', 'filestore')) + {gridPos: {x: 4, y: 8, w: 4, h: 8}}, |
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.
Are you sure? I have no clue about what this was for... :S Maybe @pcuzner recalls...
7e9a1cf
to
2298084
Compare
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
ef3089d
to
64b0a9f
Compare
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
64b0a9f
to
57c2631
Compare
jenkins test dashboard cephadm |
[addTargetSchema('(ceph_pool_compress_under_bytes / ceph_pool_compress_bytes_used > 0) and on(pool_id) (((ceph_pool_compress_under_bytes > 0) / ceph_pool_stored_raw) * 100 > 0.5)', 1, 'table', 'A'), | ||
addTargetSchema('ceph_pool_max_avail * on(pool_id) group_left(name) ceph_pool_metadata', 1, 'table', 'B'), | ||
addTargetSchema('((ceph_pool_compress_under_bytes > 0) / ceph_pool_stored_raw) * 100', 1, 'table', 'C'), | ||
addTargetSchema('(ceph_pool_percent_used * on(pool_id) group_left(name) ceph_pool_metadata)', 1, 'table', 'D'), | ||
addTargetSchema('(ceph_pool_compress_under_bytes - ceph_pool_compress_bytes_used > 0)', 1, 'table', 'E'), |
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.
Maybe in a follow-up PR we should add a meaningful name for legendFormat in all tables: AFAIK this is displayed when you explore the table details.
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.
LGTM!
cephadm failure but unrelated. |
@pereman2 shouldn't this be a quincy backport? |
In #43669 we introduced a warning to detect duplicate title, legendFormat keys. In this PR this warning message it's changed to an error so that we won't allow duplicate keys to happen in order to improve the reliability of grafana tests.
The first commit will be deleted after #44190 is merged.Fixes: https://tracker.ceph.com/issues/53754
Signed-off-by: Pere Diaz Bou pdiazbou@redhat.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox