mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 10:03:33 -06:00
122 lines
3.1 KiB
JSON
122 lines
3.1 KiB
JSON
{
|
|
"name": "group42",
|
|
"interval": "10s",
|
|
"rules": [
|
|
{
|
|
"for": "1m",
|
|
"annotations": {
|
|
"foo": "bar"
|
|
},
|
|
"labels": {
|
|
"label1": "val1"
|
|
},
|
|
"grafana_alert": {
|
|
"title": "prom query with SSE",
|
|
"condition": "condition",
|
|
"data": [
|
|
{
|
|
"refId": "query",
|
|
"queryType": "",
|
|
"relativeTimeRange": {
|
|
"from": 18000,
|
|
"to": 10800
|
|
},
|
|
"datasourceUid": "000000002",
|
|
"model": {
|
|
"expr": "http_request_duration_microseconds_count",
|
|
"hide": false,
|
|
"interval": "",
|
|
"intervalMs": 1000,
|
|
"legendFormat": "",
|
|
"maxDataPoints": 100,
|
|
"refId": "query"
|
|
}
|
|
},
|
|
{
|
|
"refId": "reduced",
|
|
"queryType": "",
|
|
"relativeTimeRange": {
|
|
"from": 18000,
|
|
"to": 10800
|
|
},
|
|
"datasourceUid": "-100",
|
|
"model": {
|
|
"expression": "query",
|
|
"hide": false,
|
|
"intervalMs": 1000,
|
|
"maxDataPoints": 100,
|
|
"reducer": "mean",
|
|
"refId": "reduced",
|
|
"type": "reduce"
|
|
}
|
|
},
|
|
{
|
|
"refId": "condition",
|
|
"queryType": "",
|
|
"relativeTimeRange": {
|
|
"from": 18000,
|
|
"to": 10800
|
|
},
|
|
"datasourceUid": "-100",
|
|
"model": {
|
|
"expression": "$reduced > 10",
|
|
"hide": false,
|
|
"intervalMs": 1000,
|
|
"maxDataPoints": 100,
|
|
"refId": "condition",
|
|
"type": "math"
|
|
}
|
|
}
|
|
],
|
|
"no_data_state": "NoData",
|
|
"exec_err_state": "Alerting"
|
|
}
|
|
},
|
|
{
|
|
"grafana_alert": {
|
|
"title": "reduced testdata query",
|
|
"condition": "B",
|
|
"data": [
|
|
{
|
|
"refId": "A",
|
|
"queryType": "",
|
|
"relativeTimeRange": {
|
|
"from": 18000,
|
|
"to": 10800
|
|
},
|
|
"datasourceUid": "000000004",
|
|
"model": {
|
|
"alias": "just-testing",
|
|
"intervalMs": 1000,
|
|
"maxDataPoints": 100,
|
|
"orgId": 0,
|
|
"refId": "A",
|
|
"scenarioId": "csv_metric_values",
|
|
"stringInput": "1,20,90,30,5,0"
|
|
}
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"queryType": "",
|
|
"relativeTimeRange": {
|
|
"from": 18000,
|
|
"to": 10800
|
|
},
|
|
"datasourceUid": "-100",
|
|
"model": {
|
|
"expression": "$A",
|
|
"intervalMs": 2000,
|
|
"maxDataPoints": 200,
|
|
"orgId": 0,
|
|
"reducer": "mean",
|
|
"refId": "B",
|
|
"type": "reduce"
|
|
}
|
|
}
|
|
],
|
|
"no_data_state": "NoData",
|
|
"exec_err_state": "Alerting"
|
|
}
|
|
}
|
|
]
|
|
} |