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

Commit 7a64b1b

Browse files
authored
Merge pull request #230 from grafana/add-avg-and-max-blocks-per-tenant
Added avg and max blocks / tenant
2 parents 885d532 + ca1b50b commit 7a64b1b

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
* [ENHANCEMENT] Introduce a resources dashboard for the Alertmanager. #219
88
* [ENHANCEMENT] Improves query visibility in the Ruler Dashboard for both chunks and blocks storage. #226
99
* [ENHANCEMENT] Add query-scheduler to dashboards. Add alert for queries stuck in scheduler. #228
10-
* [ENHANCEMENT] Improved blocks storage observability: #224
10+
* [ENHANCEMENT] Improved blocks storage observability: #224 #230
1111
- Cortex / Writes: added current number of tenants in the cluster
1212
- Cortex / Writes Resources: added ingester disk read/writes/utilisation
1313
- Cortex / Reads Resources: added store-gateway disk read/writes/utilisation
1414
- Cortex / Queries: added "Lazy loaded index-headers" and "Index-header lazy load duration"
15-
- Cortex / Compactor: added "Tenants compaction progress"
15+
- Cortex / Compactor: added "Tenants compaction progress", "Average blocks / tenant" and "Tenants with largest number of blocks"
1616
- Alerts: added "CortexMemoryMapAreasTooHigh"
1717
* [BUGFIX] Fixed workingset memory panel while rolling out a StatefulSet. #229
1818

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)