Alert always return "No Data" message

Hi.

I’m trying to create a new alert, but always return “no data” message. The query is working and returning data normally. How to create an alert properly? Some screen shots:

Test rule result:

> {
>   "firing": false,
>   "state": "no_data",
>   "conditionEvals": "false = false",
>   "timeMs": "2.358ms",
>   "logs": [
>     {
>       "message": "Condition[0]: Query",
>       "data": {
>         "from": 1597150937665,
>         "queries": [
>           {
>             "refId": "A",
>             "model": {
>               "alias": "GERAÇÃO",
>               "groupBy": [
>                 {
>                   "params": [
>                     "$__interval"
>                   ],
>                   "type": "time"
>                 },
>                 {
>                   "params": [
>                     "null"
>                   ],
>                   "type": "fill"
>                 }
>               ],
>               "interval": "",
>               "orderByTime": "ASC",
>               "policy": "default",
>               "query": "select * from \"POTENCIA_GERAL\" WHERE $timeFilter ORDER BY time ASC",
>               "rawQuery": true,
>               "refId": "A",
>               "resultFormat": "time_series",
>               "select": [
>                 [
>                   {
>                     "params": [
>                       "value"
>                     ],
>                     "type": "field"
>                   },
>                   {
>                     "params": [],
>                     "type": "mean"
>                   }
>                 ]
>               ],
>               "tags": []
>             },
>             "datasource": {
>               "id": 1,
>               "name": "InfluxDB"
>             },
>             "maxDataPoints": 0,
>             "intervalMs": 0
>           }
>         ],
>         "to": 1597151237665
>       }
>     },
>     {
>       "message": "Condition[0]: Query Result",
>       "data": {
>         "series": [
>           {
>             "name": "GERAÇÃO",
>             "points": [
>               [
>                 null,
>                 1597150941
>               ],
>               [
>                 null,
>                 1597150946
>               ],
>               [
>                 null,
>                 1597150950
>               ],
>               [
>                 null,
>                 1597150955
>               ],
				...
>             ]
>           }
>         ]
>       }
>     },
>     {
>       "message": "Condition[0]: Eval: false, Metric: GERAÇÃO, Value: null",
>       "data": null
>     }
>   ]
> }

When I click to “Inspect Query”, return data normally.

You’re getting data. I don’t see the No Data error in the UI.

Try setting the For field to something lower. Right now, you’ll only get the alert if it is firing for a full 2 minutes.