Hi,
I’m running grafana8 and influxdb2 and have trouble getting alerts to work.
This is my flux query A:
from(bucket: "MYBUCKET")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) =>
r._measurement == "bfield" and
r._field == "BY"
)
and my alert condition is:
WHEN avg () OF query (A, 1m, now) IS ABOVE 0
evaluated every 1m FOR 5m.
But whatever I do when I run Test rule I get the error:
TypeError: e.groupBy is undefined
This is the output of Test rule:
{
"firing": false,
"state": "no_data",
"conditionEvals": "false = false",
"timeMs": "244.384ms",
"logs": [
{
"message": "Condition[0]: Query",
"data": {
"from": 1625241127369,
"queries": [
{
"refId": "A",
"model": {
"hide": true,
"query": "from(bucket: \"MYBUCKET\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) =>\n r._measurement == \"bfield\" and\n r._field == \"BY\"\n )",
"refId": "A"
},
"datasource": {
"id": 1,
"name": "InfluxDB-bfield"
},
"maxDataPoints": 0,
"intervalMs": 0
}
],
"to": 1625241187369
}
},
{
"message": "Condition[0]: Query Result",
"data": {
"fromDataframe": true,
"series": [
{
"name": "",
"points": []
}
]
}
},
{
"message": "Condition[0]: Eval: false, Metric: , Value: null",
"data": null
}
]
}
I am at a loss what this error refers to. Any ideas?
Thanks!