grafana-discrete-panel icon indicating copy to clipboard operation
grafana-discrete-panel copied to clipboard

Shows random time range values on hover

Open baur opened this issue 5 years ago • 4 comments

TIME RANGE image

OK image

FAIL image

FAIL image

baur avatar Apr 15 '20 03:04 baur

I've got the same problem in my setup (plugin version 0.1.0):

Time range in the tooltip is OK for the most right block: image

But hovering one block more to the left, the time range is clearly wrong: image

You can see in the first picture that the most right block started at 16:18 and in the second picture that the previous block ended at 15:33. But there is no unfilled space between those blocks.
According to the logs 16:18 is correct, I have no idea where this 15:33 timestamp comes from

modularTaco avatar Dec 17 '20 08:12 modularTaco

Hi, I think you saving the values on change correct?

We had the same issue. This problem only occures when the status change timestamp is before the start time of the dashboard (at least in our case). I have adjusted the query to overwrite the time if it is before the starttime of the dashboard. I replaced the time (our columnname is start_time) in the SELECT with:

if(start_time < $__timeFrom(), $__timeFrom(), start_time)

afbeelding

This adjust fixed this issue for us, I hope for you to!

Have a nice day.

vakok avatar Feb 12 '21 07:02 vakok

Hi, I think you saving the values on change correct?

We had the same issue. This problem only occures when the status change timestamp is before the start time of the dashboard (at least in our case). I have adjusted the query to overwrite the time if it is before the starttime of the dashboard. I replaced the time (our columnname is start_time) in the SELECT with:

if(start_time < $__timeFrom(), $__timeFrom(), start_time)

afbeelding

This adjust fixed this issue for us, I hope for you to!

Have a nice day.

Thanks for the hint!
Unfortunately InfluxDB (which is our datasource in this case) does not support constructs like if or CASE.
So this does not seem to be a viable fix for me.

modularTaco avatar Feb 12 '21 10:02 modularTaco

Hi, I think you saving the values on change correct? We had the same issue. This problem only occures when the status change timestamp is before the start time of the dashboard (at least in our case). I have adjusted the query to overwrite the time if it is before the starttime of the dashboard. I replaced the time (our columnname is start_time) in the SELECT with: if(start_time < $__timeFrom(), $__timeFrom(), start_time) afbeelding This adjust fixed this issue for us, I hope for you to! Have a nice day.

Thanks for the hint! Unfortunately InfluxDB (which is our datasource in this case) does not support constructs like if or CASE. So this does not seem to be a viable fix for me.

Your welcome!

We are going to switch to InfluxDB. Is it not possible the InfluxDB Fill the gabs? This is the problem with logging on change in combination with this panel. If you find any thing to fix this in Influx, I hope you want to share it with us ;-)

vakok avatar Feb 12 '21 15:02 vakok