Problem with 24h time chunks (InfluxDB tweak needed?)

Posted on
Tue May 05, 2020 7:59 pm
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Problem with 24h time chunks (InfluxDB tweak needed?)

I am trying to show last 30 days energy usage , with a bar for each 24 hour chunk (see screenshot).

The data in the Indigo variable gets incremented every 2 seconds from Midnight to Midnight, and then is reset.

The problem is that Grafana is displaying some of the data from say May 4th on both May 4th & May 5th (at least visually)

I have tried changing both the dashboard & overall preferences for time zone (Default, Local Browser Time, UTC), but that doesn't seem to fix it, nor does tinkering with the Time shift.

So then I saw that the time zone might need to be changed in InfluxDB, but wanted to check if I am missing something else obvious. Here is the link where I found this clue:

https://github.com/cockroachdb/cockroach/issues/20428

Screen Shot 2020-05-05 at 6.56.58 PM (1).jpeg
Screen Shot 2020-05-05 at 6.56.58 PM (1).jpeg (249.94 KiB) Viewed 1239 times

Posted on
Wed May 06, 2020 10:57 am
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Re: Problem with 24h time chunks (InfluxDB tweak needed?)

I think I fixed it. Had to change SELECT from last() to max()

Screen Shot 2020-05-06 at 9.54.58 AM.jpeg
Screen Shot 2020-05-06 at 9.54.58 AM.jpeg (284.4 KiB) Viewed 1211 times

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron