Alerting: Add extended definition to prometheus alert rules api (#103320)

* Alerting: Add extended definition to prometheus alert rules api

This adds `isPaused` and `notificationSettings` to the paginated rules api to enable the paginated view of GMA rules.

refactor: make alert rule status and state retrieval extensible

This lets us get status from other sources than the local ruler.

* update swagger spec

* add safety checks in test
This commit is contained in:
Moustafa Baiou
2025-04-23 21:14:09 +01:00
committed by GitHub
parent b09d79b21c
commit 9f07e49cdd
9 changed files with 292 additions and 115 deletions
+13 -1
View File
@@ -475,6 +475,9 @@
"health": {
"type": "string"
},
"isPaused": {
"type": "boolean"
},
"keepFiringFor": {
"format": "double",
"type": "number"
@@ -492,6 +495,9 @@
"name": {
"type": "string"
},
"notificationSettings": {
"$ref": "#/definitions/AlertRuleNotificationSettings"
},
"queriedDatasourceUIDs": {
"items": {
"type": "string"
@@ -3769,6 +3775,9 @@
"health": {
"type": "string"
},
"isPaused": {
"type": "boolean"
},
"labels": {
"$ref": "#/definitions/Labels"
},
@@ -3782,6 +3791,9 @@
"name": {
"type": "string"
},
"notificationSettings": {
"$ref": "#/definitions/AlertRuleNotificationSettings"
},
"query": {
"type": "string"
},
@@ -6649,4 +6661,4 @@
}
},
"swagger": "2.0"
}
}