Skip to content

Commit

Permalink
Cortex writes dashboard: add panels for KV activity
Browse files Browse the repository at this point in the history
For HA-tracker, show which tenants are changing election.
For ingester, show how many are active, leaving, etc.
  • Loading branch information
bboreham committed Aug 18, 2021
1 parent c09fed3 commit 76b89ff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* [CHANGE] Increased `CortexIngesterReachingSeriesLimit` critical alert threshold from 80% to 85%. #363
* [CHANGE] Decreased `-server.grpc-max-concurrent-streams` from 100k to 10k. #369
* [CHANGE] Decreased blocks storage ingesters graceful termination period from 80m to 20m. #369
* [ENHANCEMENT] Writes dashboard: fix HA-tracker KV panels; add elections panel and ingester state panel. #371
* [ENHANCEMENT] cortex-mixin: Make `cluster_namespace_deployment:kube_pod_container_resource_requests_{cpu_cores,memory_bytes}:sum` backwards compatible with `kube-state-metrics` v2.0.0. #317
* [ENHANCEMENT] Cortex-mixin: Include `cortex-gw-internal` naming variation in default `gateway` job names. #328
* [ENHANCEMENT] Ruler dashboard: added object storage metrics. #354
Expand Down
19 changes: 18 additions & 1 deletion cortex-mixin/dashboards/writes.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ local utils = import 'mixin-utils/utils.libsonnet';
$.panel('Latency') +
utils.latencyRecordingRulePanel('cortex_kv_request_duration_seconds', $.jobSelector($._config.job_names.distributor) + [utils.selector.eq('kv_name', 'distributor-hatracker')])
)
.addPanel(
$.panel('Elected replica changes / min') +
$.queryPanel([
'max by(exported_cluster, user)(increase(cortex_ha_tracker_elected_replica_changes_total{%s}[1m])) >0' % $.jobMatcher($._config.job_names.distributor),
], [
'{{user}}/{{exported_cluster}}',
]) +
$.stack + {
yaxes: $.yaxes('cpm'),
},
)
)
.addRow(
Expand Down Expand Up @@ -138,8 +148,15 @@ local utils = import 'mixin-utils/utils.libsonnet';
)
.addPanel(
$.panel('Latency') +
utils.latencyRecordingRulePanel('cortex_kv_request_duration_seconds', $.jobSelector($._config.job_names.ingester)+ [utils.selector.eq('kv_name', 'ingester-lifecycler')])
utils.latencyRecordingRulePanel('cortex_kv_request_duration_seconds', $.jobSelector($._config.job_names.ingester) + [utils.selector.eq('kv_name', 'ingester-lifecycler')])
)
.addPanel(
$.panel('Ingester status') +
$.queryPanel([
'max by (state)(cortex_ring_members{%s}) >0' % $.jobMatcher($._config.job_names.distributor),
], [
'{{state}}',
])
)
)
.addRowIf(
Expand Down

0 comments on commit 76b89ff

Please sign in to comment.