diff --git a/CHANGELOG.md b/CHANGELOG.md index bbdacc1b87..690a1ae256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#6050](https://github.com/thanos-io/thanos/pull/6050) Store: Re-try bucket store initial sync upon failure. - [#6067](https://github.com/thanos-io/thanos/pull/6067) Receive: fixed panic when querying uninitialized TSDBs. - [#6082](https://github.com/thanos-io/thanos/pull/6082) Store: Don't error when no stores are matched. +- [#6103](https://github.com/thanos-io/thanos/pull/6103) Mixins(Rule): Fix query for long rule evaluations. ### Changed diff --git a/examples/dashboards/rule.json b/examples/dashboards/rule.json index f7d7843859..569a5aaeec 100644 --- a/examples/dashboards/rule.json +++ b/examples/dashboards/rule.json @@ -197,7 +197,7 @@ "steppedLine": false, "targets": [ { - "expr": "(\n max by(job, rule_group) (prometheus_rule_group_last_duration_seconds{job=~\"$job\"})\n >\n sum by(job, rule_group) (prometheus_rule_group_interval_seconds{job=~\"$job\"})\n)\n", + "expr": "(\n sum by(job, rule_group) (prometheus_rule_group_last_duration_seconds{job=~\"$job\"})\n >\n sum by(job, rule_group) (prometheus_rule_group_interval_seconds{job=~\"$job\"})\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{ rule_group }}", diff --git a/mixin/dashboards/rule.libsonnet b/mixin/dashboards/rule.libsonnet index b62814f099..411544d10a 100644 --- a/mixin/dashboards/rule.libsonnet +++ b/mixin/dashboards/rule.libsonnet @@ -38,7 +38,7 @@ local utils = import '../lib/utils.libsonnet'; g.queryPanel( ||| ( - max by(%(dimensions)s, rule_group) (prometheus_rule_group_last_duration_seconds{%(selector)s}) + sum by(%(dimensions)s, rule_group) (prometheus_rule_group_last_duration_seconds{%(selector)s}) > sum by(%(dimensions)s, rule_group) (prometheus_rule_group_interval_seconds{%(selector)s}) )