Only partial data in time range is shown in chart

Grafana 9.9.5 on FreeBSD 13

Color me stupid but I must be missing something basic and it’s no doubt right in front of me but I’ll be damned if I can see it.

Below is a screen shot of my time series chart from data that is updating every 15 seconds from sun up to sun down (it’s from a PV install). I have the time range set to 12 hours but the chart only shows about 5 hours of data. The last data point shown is current. Why am I not seeing the data from -12 to -7 hours ago - only from -5 hours ago till now?

My query is pretty simple (postgres 13)

SELECT “Pac”, $__time(stamp at time zone ‘PDT’) FROM stats where stamp >= $__timeFrom(stamp) and stamp < $__timeTo(stamp) (using $__timeFilter(stamp) gives the same results).

If I switch to anything less than 12 hours I get an empty chart with “No data” displayed. If I switch to 2 days or more, I get that many days worth of data displayed (or it seems that way anyway - definitely multiple days). Also, removing the “at time zone” has no effect, as expected.

I searched the forum and did find one other question that’s very similar this but there were no responses. Hopefully someone can help.

1 Like

Is your data time stamp UTC? Or utc+/-

The field is in UTC (never store time data in anything but UTC :wink:).

But it’s not a data issue. It’s a grafana issue. I have an old cgi/perl setup that displays the exact same data just fine. If I run a straight select on the data everything is fine. It’s only grafana when I use certain time ranges that there’s a problem.

As I mentioned, if I change the time range to “24 hours”, “2 days”, etc then I get all the data that doesn’t show up when I use “12 hours” or less. It’s just that “12 hours” shows some data. Anything less shows nothing.

1 Like