Unable to create alert using Infinity Datasource w/Backend Parser

This is similar to: JSONata queries not working while creating Alert Rule

  • Grafana Version: 10.4.0
  • Infinity Datasource Plugin version: 2.9.5

I am aware of the limitation / requirement that I must use the backend parser if attempting to create an alert: Limitations

I have a GraphQL query that, after running it through a pretty straightforward expression (see below)

gives me data like the following:

[
  {
    "ts": "2024-11-06T19:05:49Z",
    "val": 0
  },
  {
    "ts": "2024-11-07T09:43:57Z",
    "val": 22.017
  },
...
]

When I look at it on a graph, it functions as expected:

However, when I attempt to do this on the alerts page, it won’t give me a graph view of it, it comes in as this funky table, and I can’t seem to get a simple classic condition (count(A)) to return what I would expect.

I basically want it to alert whenever there is no history data for the past hour. Am I doing something wrong? @yesoreyeram ?

Potentially also related to: Alert in Grafana Infinity Datasource remains in "pending" state when including a time and minute selector in a column · Issue #618 · grafana/grafana-infinity-datasource · GitHub ?

Now I just feel silly. It seems I was missing the datatype conversion under the “Columns” section. Hopefully this helps somebody in the future…

Glad you figured it out yourself. Infinity isn’t intelligent enough to recognize ts as time field. Instead it is defaulting to string.