Graph gets garbled. Only single datasource

Hi, my graph gets randomly garbled. Sometimes F5’ing it helps.
My datasource is a AWS timestream and I use this query:

SELECT * FROM $__database.$__table WHERE measure_name = ‘temp’

When I download the data as CSV and create a graph offline, it looks fine.

I would like to get a pointer where to start debugging this.

  1. Which version of Grafana are you using?

  2. Which operating system and version is it installed on?

  3. Which web browser are you using?

  4. Which operating system and version is the browser running on?

  5. How much memory do you have in the machine running the browser?

  6. Have you tried viewing Grafana with a different browser or from a different
    machine?

“Sometimes F5’ing it helps” makes me think very much this is a client-side
(browser) problem rather than Grafana, but testing the same dashboard from a
browser on another machine (preferably at the same time as you experience the
problem on the first machine) would be a good indicator whether this is
correct.

Antony.

Hi pooh,

Thanks for your response.
I’m using Grafana Cloud (free tier). So I don’t know (nor should have to know) the Grafana version or operating system its installed on.

I’m viewing it on a MBP from 2020 running Big Sur (uptodate) with 16Gb of memory, 6Gb free when watching the dashboard. I’ve tried Chrome 90 and Safari 14.1.

Both show the same graph garbled in the same way, so I don’t think its client side rendering.
Left screen is Chrome 90, right screen is Safare 14.1.

Hi @djvanhelmond. SQL queries must be ordered by time for a graph visualization like the one you’re using to show properly.

For the Timestream datasource you’re useing, the macro to use would be $__timeFilter, per the “Macros” section of the Timestream plugin doc here: Amazon Timestream plugin for Grafana | Grafana Labs

And then the query would need to have something like a “ORDER BY ASC” clause.

I don’t have an exact example for Timestream but here’s how that SQL query would look in for the MySQL datasource (based on the variables described for that data source here: MySQL | Grafana Labs)

SELECT
  UNIX_TIMESTAMP(atimestamp) as time,
  aint as value,
  avarchar as metric
FROM my_table
WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
ORDER BY atimestamp ASC
1 Like

Thanks! This is the resolution!