Alerting: Support query_offset in the Prometheus conversion (#102499)

Adds support for rule group-level query_offset in Prometheus to Grafana rule conversion. It allows specifying a time offset for rule evaluation, which gets applied and saved during the conversion.
This commit is contained in:
Alexander Akhmetov
2025-03-20 18:05:55 +01:00
committed by GitHub
parent 0845c781ae
commit ad71270ee0
11 changed files with 160 additions and 28 deletions
@@ -4433,6 +4433,9 @@
"isPaused": {
"type": "boolean"
},
"keepFiringFor": {
"$ref": "#/definitions/Duration"
},
"labels": {
"type": "object",
"additionalProperties": {
@@ -4703,6 +4706,10 @@
"health": {
"type": "string"
},
"keepFiringFor": {
"type": "number",
"format": "double"
},
"labels": {
"$ref": "#/definitions/Labels"
},
@@ -7238,9 +7245,22 @@
"Interval": {
"$ref": "#/definitions/Duration"
},
"Labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"Limit": {
"type": "integer",
"format": "int64"
},
"Name": {
"type": "string"
},
"QueryOffset": {
"type": "string"
},
"Rules": {
"type": "array",
"items": {
@@ -7354,6 +7374,10 @@
"type": "boolean",
"example": false
},
"keep_firing_for": {
"type": "string",
"format": "duration"
},
"labels": {
"type": "object",
"additionalProperties": {