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

Commit d96454a

Browse files
committed
Added TSDB metrics to Cortex / Writes dashboard
Signed-off-by: Marco Pracucci <[email protected]>
1 parent 031da23 commit d96454a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

cortex-mixin/dashboards/writes.libsonnet

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,43 @@ local utils = import 'mixin-utils/utils.libsonnet';
163163
$.panel('Upload latency') +
164164
$.latencyPanel('thanos_objstore_bucket_operation_duration_seconds', '{%s,component="ingester",operation="upload"}' % $.jobMatcher($._config.job_names.ingester)),
165165
)
166+
)
167+
.addRowIf(
168+
std.setMember('tsdb', $._config.storage_engine),
169+
$.row('Ingester - Blocks storage - TSDB Compactions')
170+
.addPanel(
171+
$.successFailurePanel(
172+
'Compactions / sec',
173+
'sum(rate(cortex_ingester_tsdb_compactions_total{%s}[$__interval]))' % [$.jobMatcher($._config.job_names.ingester)],
174+
'sum(rate(cortex_ingester_tsdb_compactions_failed_total{%s}[$__interval]))' % $.jobMatcher($._config.job_names.ingester),
175+
),
176+
)
177+
.addPanel(
178+
$.panel('Compactions latency') +
179+
$.latencyPanel('cortex_ingester_tsdb_compaction_duration_seconds', '{%s}' % $.jobMatcher($._config.job_names.ingester)),
180+
)
181+
)
182+
.addRowIf(
183+
std.setMember('tsdb', $._config.storage_engine),
184+
$.row('Ingester - Blocks storage - TSDB WAL truncation and checkpoints')
185+
.addPanel(
186+
$.successFailurePanel(
187+
'WAL truncations / sec',
188+
'sum(rate(cortex_ingester_tsdb_wal_truncations_total{%s}[$__interval])) - sum(rate(cortex_ingester_tsdb_wal_truncations_failed_total{%s}[$__interval]))' % [$.jobMatcher($._config.job_names.ingester), $.jobMatcher($._config.job_names.ingester)],
189+
'sum(rate(cortex_ingester_tsdb_wal_truncations_failed_total{%s}[$__interval]))' % $.jobMatcher($._config.job_names.ingester),
190+
),
191+
)
192+
.addPanel(
193+
$.successFailurePanel(
194+
'Checkpoints created / sec',
195+
'sum(rate(cortex_ingester_tsdb_checkpoint_creations_total{%s}[$__interval])) - sum(rate(cortex_ingester_tsdb_checkpoint_creations_failed_total{%s}[$__interval]))' % [$.jobMatcher($._config.job_names.ingester), $.jobMatcher($._config.job_names.ingester)],
196+
'sum(rate(cortex_ingester_tsdb_checkpoint_creations_failed_total{%s}[$__interval]))' % $.jobMatcher($._config.job_names.ingester),
197+
),
198+
)
199+
.addPanel(
200+
$.panel('WAL truncations latency') +
201+
$.queryPanel('sum(rate(cortex_ingester_tsdb_wal_truncate_duration_seconds_sum{%s}[$__interval])) / sum(rate(cortex_ingester_tsdb_wal_truncate_duration_seconds_count{%s}[$__interval]))' % [$.jobMatcher($._config.job_names.ingester), $.jobMatcher($._config.job_names.ingester)], 'avg') +
202+
{ yaxes: $.yaxes('s') },
203+
)
166204
),
167205
}

0 commit comments

Comments
 (0)