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

Commit c09fed3

Browse files
committed
Cortex kv panels: narrow to one instance
Distributor uses multiple kv stores - for global limits and ha-tracker, as well as reading from the ingester ring - so we need to narrow the panel to just the one it says it is showing. For consistency, do the same on the ingester panel, although currently ingesters only have one kv store. Note that the renamed recording rule will mean that dashboards show no data for latency prior to the change.
1 parent 2250a8f commit c09fed3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

cortex-mixin/dashboards/writes.libsonnet

+6-4
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,12 @@ local utils = import 'mixin-utils/utils.libsonnet';
104104
$.row('Key-value store for high-availability (HA) deduplication')
105105
.addPanel(
106106
$.panel('Requests / sec') +
107-
$.qpsPanel('cortex_kv_request_duration_seconds_count{%s}' % $.jobMatcher($._config.job_names.distributor))
107+
$.qpsPanel('cortex_kv_request_duration_seconds_count{%s,kv_name="distributor-hatracker"}' % $.jobMatcher($._config.job_names.distributor))
108108
)
109109
.addPanel(
110110
$.panel('Latency') +
111-
utils.latencyRecordingRulePanel('cortex_kv_request_duration_seconds', $.jobSelector($._config.job_names.distributor))
111+
utils.latencyRecordingRulePanel('cortex_kv_request_duration_seconds', $.jobSelector($._config.job_names.distributor) + [utils.selector.eq('kv_name', 'distributor-hatracker')])
112+
)
112113
)
113114
)
114115
.addRow(
@@ -133,11 +134,12 @@ local utils = import 'mixin-utils/utils.libsonnet';
133134
$.row('Key-value store for the ingesters ring')
134135
.addPanel(
135136
$.panel('Requests / sec') +
136-
$.qpsPanel('cortex_kv_request_duration_seconds_count{%s}' % $.jobMatcher($._config.job_names.ingester))
137+
$.qpsPanel('cortex_kv_request_duration_seconds_count{%s,kv_name="ingester-lifecycler"}' % $.jobMatcher($._config.job_names.ingester))
137138
)
138139
.addPanel(
139140
$.panel('Latency') +
140-
utils.latencyRecordingRulePanel('cortex_kv_request_duration_seconds', $.jobSelector($._config.job_names.ingester))
141+
utils.latencyRecordingRulePanel('cortex_kv_request_duration_seconds', $.jobSelector($._config.job_names.ingester)+ [utils.selector.eq('kv_name', 'ingester-lifecycler')])
142+
)
141143
)
142144
)
143145
.addRowIf(

cortex-mixin/recording_rules.libsonnet

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
4242
utils.histogramRules('cortex_chunk_store_chunks_per_query', ['cluster', 'job']) +
4343
utils.histogramRules('cortex_database_request_duration_seconds', ['cluster', 'job', 'method']) +
4444
utils.histogramRules('cortex_gcs_request_duration_seconds', ['cluster', 'job', 'operation']) +
45-
utils.histogramRules('cortex_kv_request_duration_seconds', ['cluster', 'job']),
45+
utils.histogramRules('cortex_kv_request_duration_seconds', ['cluster', 'job', 'kv_name']),
4646
},
4747
{
4848
name: 'cortex_queries',

0 commit comments

Comments
 (0)