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

Commit 2d4fd4e

Browse files
authored
Merge pull request #353 from grafana/add-per-route-p99-latency-in-ruler-config-api
Added 'Per route p99 latency' to ruler configuration API
2 parents 27078c6 + 6f612e0 commit 2d4fd4e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* [ENHANCEMENT] Dashboards: defined container functions for common resources panels: containerDiskWritesPanel, containerDiskReadsPanel, containerDiskSpaceUtilization. #331
2727
* [ENHANCEMENT] cortex-mixin: Added `alert_excluded_routes` config to exclude specific routes from alerts. #338
2828
* [ENHANCEMENT] Added `CortexMemcachedRequestErrors` alert. #346
29+
* [ENHANCEMENT] Ruler dashboard: added "Per route p99 latency" panel in the "Configuration API" row. #353
2930
* [BUGFIX] Fixed `CortexIngesterHasNotShippedBlocks` alert false positive in case an ingester instance had ingested samples in the past, then no traffic was received for a long period and then it started receiving samples again. #308
3031
* [BUGFIX] Alertmanager: fixed `--alertmanager.cluster.peers` CLI flag passed to alertmanager when HA is enabled. #329
3132
* [BUGFIX] Fixed `CortexInconsistentRuntimeConfig` metric. #335

cortex-mixin/dashboards/ruler.libsonnet

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
local utils = import 'mixin-utils/utils.libsonnet';
22

33
(import 'dashboard-utils.libsonnet') {
4+
local ruler_config_api_routes_re = 'api_prom_rules.*|api_prom_api_v1_(rules|alerts)',
45

56
rulerQueries+:: {
67
ruleEvaluations: {
@@ -106,11 +107,19 @@ local utils = import 'mixin-utils/utils.libsonnet';
106107
$.row('Configuration API (gateway)')
107108
.addPanel(
108109
$.panel('QPS') +
109-
$.qpsPanel('cortex_request_duration_seconds_count{%s, route=~"api_prom_rules.*|api_prom_api_v1_(rules|alerts)"}' % $.jobMatcher($._config.job_names.gateway))
110+
$.qpsPanel('cortex_request_duration_seconds_count{%s, route=~"%s"}' % [$.jobMatcher($._config.job_names.gateway), ruler_config_api_routes_re])
110111
)
111112
.addPanel(
112113
$.panel('Latency') +
113-
utils.latencyRecordingRulePanel('cortex_request_duration_seconds', $.jobSelector($._config.job_names.gateway) + [utils.selector.re('route', 'api_prom_rules.*|api_prom_api_v1_(rules|alerts)')])
114+
utils.latencyRecordingRulePanel('cortex_request_duration_seconds', $.jobSelector($._config.job_names.gateway) + [utils.selector.re('route', ruler_config_api_routes_re)])
115+
)
116+
.addPanel(
117+
$.panel('Per route p99 Latency') +
118+
$.queryPanel(
119+
'histogram_quantile(0.99, sum by (route, le) (cluster_job_route:cortex_request_duration_seconds_bucket:sum_rate{%s, route=~"%s"}))' % [$.jobMatcher($._config.job_names.gateway), ruler_config_api_routes_re],
120+
'{{ route }}'
121+
) +
122+
{ yaxes: $.yaxes('s') }
114123
)
115124
)
116125
.addRow(

0 commit comments

Comments
 (0)