Skip to content

Commit

Permalink
Split cortex_api recording rule group into three groups.
Browse files Browse the repository at this point in the history
This is a workaround for large clusters where this group can become slow to evaluate.
  • Loading branch information
stevesg committed Oct 4, 2021
1 parent 0c84691 commit aa070b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* `_config` > `queryFrontend` > `shard_factor`
* `_config` > `queryFrontend` > `sharded_queries_enabled`
* `_config` > `queryFrontend` > `query_split_factor`
* [CHANGE] Split `cortex_api` recording rule group into three groups. This is a workaround for large clusters where this group can become slow to evaluate. #401
* [ENHANCEMENT] Add overrides config to compactor. This allows setting retention configs per user. #386
* [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
Expand Down
14 changes: 11 additions & 3 deletions cortex-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 aa070b4

Please sign in to comment.