Grafana v7 to Grafana v8 - Now getting input frame is not recognized as a time series in alert error

I have SQL data source that checks a table for rows with a status of “failure”. Each row has their timestamp. When life is good, zero rows are returned. This has been working with Grafana v7 but after upgrading to Grafana v8 I started receiving the below error:

request handler failed to convert dataframe "results" to plugins.DataTimeSeriesSlice: input frame is not recognized as a time series

My SQL queries are using the Grafana macros to get the time column alias and data range filtering.

How do I even go about debugging this error? I’ve double checked the SQL and everything executes fine.

Hi @michaelblack

The sql datasources went through a breaking change in v8, where they now handle dataframes in a more versatile manner. Quickly, have you tried changing the query to return the data as a table and not time-series?

There is a larger discussion about this issue and how to handle it in our changelog. Check this out and let us know if it helps you get unblocked:

Upgrade Grafana | Grafana Labs

Grafana v8.0 changes the underlying data structure to data frames for the Postgres, MySQL, Microsoft SQL Server data sources. As a result, a Time series query result gets returned in a wide format. To make the visualizations work as they did before, you might have to do some manual migrations.

For any existing panels/visualizations using a Time series query, where the time column is only needed for filtering the time range, for example, using the bar gauge or pie chart panel, we recommend that you use a Table query instead and exclude the time column as a field in the response.

Refer to this issue comment for detailed instructions and workarounds.

I tried changing it to a table from a timeseries but no luck. I’m reading through the linked discussion to see if there’s a solution there that I can deploy. Thanks for the links.

1 Like

I’ve found that if I don’t use the $__timeGroupAlias() helper function but just the regular $__time() helper, then the alert will work.

1 Like

This topic was automatically closed after 365 days. New replies are no longer allowed.