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

Commit 8bcc3a5

Browse files
committed
simpler regex
Signed-off-by: Jacob Lisi <[email protected]>
1 parent 7152fa4 commit 8bcc3a5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cortex-mixin/dashboards/writes.libsonnet

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ local utils = import 'mixin-utils/utils.libsonnet';
2727
)
2828
.addPanel(
2929
$.panel('QPS') +
30-
$.statPanel('sum(rate(cortex_request_duration_seconds_count{%s, route="(api_v1|api_prom)_push"}[5m]))' % $.jobMatcher($._config.job_names.gateway), format='reqps')
30+
$.statPanel('sum(rate(cortex_request_duration_seconds_count{%s, route="api_(v1|prom)_push"}[5m]))' % $.jobMatcher($._config.job_names.gateway), format='reqps')
3131
)
3232
)
3333
.addRow(
3434
$.row('Gateway')
3535
.addPanel(
3636
$.panel('QPS') +
37-
$.qpsPanel('cortex_request_duration_seconds_count{%s, route="(api_v1|api_prom)_push"}' % $.jobMatcher($._config.job_names.gateway))
37+
$.qpsPanel('cortex_request_duration_seconds_count{%s, route="api_(v1|prom)_push"}' % $.jobMatcher($._config.job_names.gateway))
3838
)
3939
.addPanel(
4040
$.panel('Latency') +
41-
utils.latencyRecordingRulePanel('cortex_request_duration_seconds', $.jobSelector($._config.job_names.gateway) + [utils.selector.eq('route', '(api_v1|api_prom)_push')])
41+
utils.latencyRecordingRulePanel('cortex_request_duration_seconds', $.jobSelector($._config.job_names.gateway) + [utils.selector.eq('route', 'api_(v1|prom)_push')])
4242
)
4343
.addPanel(
4444
$.panel('Per %s p99 Latency' % $._config.per_instance_label) +
4545
$.hiddenLegendQueryPanel(
46-
'histogram_quantile(0.99, sum by(le, %s) (rate(cortex_request_duration_seconds_bucket{%s, route="(api_v1|api_prom)_push"}[$__interval])))' % [$._config.per_instance_label, $.jobMatcherEquality($._config.job_names.gateway)], ''
46+
'histogram_quantile(0.99, sum by(le, %s) (rate(cortex_request_duration_seconds_bucket{%s, route="api_(v1|prom)_push"}[$__interval])))' % [$._config.per_instance_label, $.jobMatcherEquality($._config.job_names.gateway)], ''
4747
) +
4848
{ yaxes: $.yaxes('s') }
4949
)
@@ -52,16 +52,16 @@ local utils = import 'mixin-utils/utils.libsonnet';
5252
$.row('Distributor')
5353
.addPanel(
5454
$.panel('QPS') +
55-
$.qpsPanel('cortex_request_duration_seconds_count{%s, route=~"/httpgrpc.*|(api_v1|api_prom)_push"}' % $.jobMatcher($._config.job_names.distributor))
55+
$.qpsPanel('cortex_request_duration_seconds_count{%s, route=~"/httpgrpc.*|api_(v1|prom)_push"}' % $.jobMatcher($._config.job_names.distributor))
5656
)
5757
.addPanel(
5858
$.panel('Latency') +
59-
utils.latencyRecordingRulePanel('cortex_request_duration_seconds', $.jobSelector($._config.job_names.distributor) + [utils.selector.re('route', '/httpgrpc.*|(api_v1|api_prom)_push')])
59+
utils.latencyRecordingRulePanel('cortex_request_duration_seconds', $.jobSelector($._config.job_names.distributor) + [utils.selector.re('route', '/httpgrpc.*|api_(v1|prom)_push')])
6060
)
6161
.addPanel(
6262
$.panel('Per %s p99 Latency' % $._config.per_instance_label) +
6363
$.hiddenLegendQueryPanel(
64-
'histogram_quantile(0.99, sum by(le, %s) (rate(cortex_request_duration_seconds_bucket{%s, route=~"/httpgrpc.*|(api_v1|api_prom)_push"}[$__interval])))' % [$._config.per_instance_label, $.jobMatcherEquality($._config.job_names.distributor)], ''
64+
'histogram_quantile(0.99, sum by(le, %s) (rate(cortex_request_duration_seconds_bucket{%s, route=~"/httpgrpc.*|api_(v1|prom)_push"}[$__interval])))' % [$._config.per_instance_label, $.jobMatcherEquality($._config.job_names.distributor)], ''
6565
) +
6666
{ yaxes: $.yaxes('s') }
6767
)

0 commit comments

Comments
 (0)