Files
grafana/pkg/tests/api/alerting/test-data/rulegroup-1-post.json
Alexander Akhmetov 84120fb210 Alerting: Fix file import/export of recording rules with target datasource uid (#115663)
Alerting: Fix export of recording rules with target datasource uid
2025-12-23 11:26:15 +01:00

79 lines
1.7 KiB
JSON

{
"name": "Group1",
"interval": "1m",
"rules": [
{
"for" : "5m",
"labels" : {
"label1" : "test-label"
},
"annotations" : {
"annotation" : "test-annotation"
},
"grafana_alert": {
"title": "Rule1",
"condition": "A",
"data": [
{
"refId": "A",
"datasourceUid": "__expr__",
"model": {
"expression": "0 > 0",
"type": "math"
}
}
],
"no_data_state": "NoData",
"exec_err_state": "Alerting",
"missing_series_evals_to_resolve": 1
}
},
{
"for" : "5m",
"labels" : {
"label1" : "test-label"
},
"annotations" : {
"annotation" : "test-annotation"
},
"grafana_alert": {
"title": "Rule2",
"condition": "A",
"data": [
{
"refId": "A",
"datasourceUid": "__expr__",
"model": {
"expression": "0 == 0",
"type": "math"
}
}
],
"no_data_state": "NoData",
"exec_err_state": "Alerting",
"missing_series_evals_to_resolve": 2
}
},
{
"grafana_alert": {
"title": "RecordingRule1",
"data": [
{
"refId": "A",
"datasourceUid": "__expr__",
"model": {
"expression": "1 + 1",
"type": "math"
}
}
],
"record": {
"metric": "test_metric",
"from": "A",
"target_datasource_uid": "test-datasource-uid"
}
}
}
]
}