Skip to content

Commit df7f8a8

Browse files
jcbustospJuan BUSTOSpre-commit-ci[bot]
authored
Add rule group query_offset to Prometheus Schema (#5265)
* Add rule group query_offset to Prometheus Schema * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Juan BUSTOS <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent aec62c4 commit df7f8a8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/schemas/json/prometheus.rules.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
"$ref": "#/definitions/duration",
104104
"description": "How often rules in the group are evaluated."
105105
},
106+
"query_offset": {
107+
"$ref": "#/definitions/duration",
108+
"description": "Offset the rule evaluation timestamp of this particular group by the specified duration into the past."
109+
},
106110
"labels": {
107111
"$ref": "#/definitions/labels",
108112
"description": "Labels to add or overwrite before storing the result for its rules. Labels defined in <rule> will override the key if it has a collision."

src/test/prometheus.rules/rules.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"severity": "critical"
66
},
77
"name": "my-group-name",
8+
"query_offset": "0s",
89
"rules": [
910
{
1011
"alert": "InstanceDown",

0 commit comments

Comments
 (0)