Skip to content

Commit

Permalink
Merge pull request grafana/cortex-jsonnet#401 from stevesg/split-api-…
Browse files Browse the repository at this point in the history
…rules

Split `cortex_api` recording rule group into three groups.
  • Loading branch information
pracucci authored Oct 4, 2021
2 parents c0d2408 + 17e71c4 commit 2e7fe0f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions jsonnet/mimir-mixin/recording_rules.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ local utils = import 'mixin-utils/utils.libsonnet';
prometheusRules+:: {
groups+: [
{
name: 'cortex_api',
name: 'cortex_api_1',
rules:
utils.histogramRules('cortex_request_duration_seconds', ['cluster', 'job']),
},
{
name: 'cortex_api_2',
rules:
utils.histogramRules('cortex_request_duration_seconds', ['cluster', 'job', 'route']),
},
{
name: 'cortex_api_3',
rules:
utils.histogramRules('cortex_request_duration_seconds', ['cluster', 'job']) +
utils.histogramRules('cortex_request_duration_seconds', ['cluster', 'job', 'route']) +
utils.histogramRules('cortex_request_duration_seconds', ['cluster', 'namespace', 'job', 'route']),
},
{
Expand Down

0 comments on commit 2e7fe0f

Please sign in to comment.