Problem with timeseries graph without common time for the metric series after upgrading to grafana 8

I’m migrating from grafana 7.4.3 to grafana 8.2.1 and I have problems with some of my current time-series graphs that have more than one metric series.

The problem is that the different metric series don’t have a common timestamp, then when the data is retrieved from the mssql datasource, all the timestamps where the metric doesn’t have a value, are filled with 0, so the graph is wrong.

The data from the SQL query is the following in grafana 7:
image

but the data from grafana 8 is:

I tried to transform to multi-frame time series, but the data is transformed after being retrieved, so I still have all the 0s in the values…

Any idea on how to solve it?
Thanks

Hi @togarha

This sounds related to the breaking change that SQL datasources went through in Grafana 8. I would read this note in the changelog, follow the links, and see the new workaround and transformations that you can use to migrate tables like these to G8:

below your query in the MSSQL query editor, try changing the Format As value from time-series to table

Hi @mattabrams
I read that info days ago, but I haven’t tried because it says:

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.

And I absolutely need the time column to plot the right graph! I thought it was only for piecharts, gauges, and similar charts…

But it finally works! Not only applying the table option but in combination with a Multi-frame time series transformation

To solve this problem:

  • Format as table instead of time-series
    image
  • Transform → Prepare time seriesMulti-frame time series
    image

Thanks for your suggestion

1 Like

In the panel JSON Viewer, manually change targets->format property to “time_series”:
targets: [
“format”: “time_series”
]