forked from grafana/mimir
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to latest mimir-prometheus (grafana#10400)
* Update to latest mimir-prometheus Also implement new rule concurrency interface from prometheus/prometheus#15681 * MQE: Pull new functions test and fix _over_time functions Same fix as prometheus/prometheus#15711 and similar to what was done during the last sync: grafana#10383 * Linting * MQE: Use `.Any()` as suggested in PR * Add CHANGELOG * Remove sequentialRules, not needed A nil slice will run rules sequentially * Address PR comments * Add test to check that group isn't mutated
- Loading branch information
1 parent
6c186ae
commit 91e5fb1
Showing
31 changed files
with
1,104 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
groups: | ||
- name: chain | ||
rules: | ||
# Evaluated concurrently, no dependencies | ||
- record: job:http_requests:rate1m | ||
expr: sum by (job)(rate(http_requests_total[1m])) | ||
- record: job:http_requests:rate5m | ||
expr: sum by (job)(rate(http_requests_total[1m])) | ||
|
||
# Evaluated sequentially, dependents and dependencies | ||
- record: job1:http_requests:rate1m | ||
expr: job:http_requests:rate1m{job="job1"} | ||
- record: job1_cluster1:http_requests:rate1m | ||
expr: job1:http_requests:rate1m{cluster="cluster1"} | ||
|
||
# Evaluated concurrently, no dependents | ||
- record: job1_cluster2:http_requests:rate1m | ||
expr: job1:http_requests:rate1m{cluster="cluster2"} | ||
- record: job1_cluster1_namespace1:http_requests:rate1m | ||
expr: job1_cluster1:http_requests:rate1m{namespace="namespace1"} | ||
- record: job1_cluster1_namespace2:http_requests:rate1m | ||
expr: job1_cluster1:http_requests:rate1m{namespace="namespace2"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
groups: | ||
- name: indeterminate | ||
rules: | ||
# This shouldn't run in parallel because of the open matcher | ||
- record: job:http_requests:rate1m | ||
expr: sum by (job)(rate(http_requests_total[1m])) | ||
- record: job:http_requests:rate5m | ||
expr: sum by (job)(rate(http_requests_total[5m])) | ||
- record: job:http_requests:rate15m | ||
expr: sum by (job)(rate(http_requests_total[15m])) | ||
- record: job:http_requests:rate30m | ||
expr: sum by (job)(rate(http_requests_total[30m])) | ||
- record: job:http_requests:rate1h | ||
expr: sum by (job)(rate(http_requests_total[1h])) | ||
- record: job:http_requests:rate2h | ||
expr: sum by (job)(rate(http_requests_total[2h])) | ||
- record: matcher | ||
expr: '{job="job1"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
groups: | ||
- name: independents | ||
rules: | ||
- record: job:http_requests:rate1m | ||
expr: sum by (job)(rate(http_requests_total[1m])) | ||
- record: job:http_requests:rate5m | ||
expr: sum by (job)(rate(http_requests_total[5m])) | ||
- record: job:http_requests:rate15m | ||
expr: sum by (job)(rate(http_requests_total[15m])) | ||
- record: job:http_requests:rate30m | ||
expr: sum by (job)(rate(http_requests_total[30m])) | ||
- record: job:http_requests:rate1h | ||
expr: sum by (job)(rate(http_requests_total[1h])) | ||
- record: job:http_requests:rate2h | ||
expr: sum by (job)(rate(http_requests_total[2h])) |
Oops, something went wrong.