Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 5e50770

Browse files
committed
Added avg and max blocks / tenant
Signed-off-by: Marco Pracucci <[email protected]>
1 parent 885d532 commit 5e50770

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

cortex-mixin/dashboards/compactor.libsonnet

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
55
($.dashboard('Cortex / Compactor') + { uid: '9c408e1d55681ecb8a22c9fab46875cc' })
66
.addClusterSelectorTemplates()
77
.addRow(
8-
$.row('Compactions')
8+
$.row('Summary')
99
.addPanel(
1010
$.textPanel('', |||
1111
- **Per-instance runs**: number of times a compactor instance triggers a compaction across all tenants its shard manage.
@@ -52,6 +52,23 @@ local utils = import 'mixin-utils/utils.libsonnet';
5252
$.latencyPanel('prometheus_tsdb_compaction_duration_seconds', '{%s}' % $.jobMatcher('compactor'))
5353
)
5454
)
55+
.addRow(
56+
$.row('')
57+
.addPanel(
58+
$.textPanel('', |||
59+
- **Average blocks / tenant**: the average number of blocks per tenant.
60+
- **Tenants with largest number of blocks**: the 10 tenants with the largest number of blocks.
61+
|||),
62+
)
63+
.addPanel(
64+
$.panel('Average blocks / tenant') +
65+
$.queryPanel('avg(max by(user) (cortex_bucket_blocks_count{%s}))' % $.jobMatcher('compactor'), 'avg'),
66+
)
67+
.addPanel(
68+
$.panel('Tenants with largest number of blocks') +
69+
$.queryPanel('topk(10, max by(user) (cortex_bucket_blocks_count{%s}))' % $.jobMatcher('compactor'), '{{user}}'),
70+
)
71+
)
5572
.addRow(
5673
$.row('Garbage Collector')
5774
.addPanel(

0 commit comments

Comments
 (0)