Hello everyone,
Over the past few months I’ve been slipping deeper and deeper into Grafana and I’m still impressed and surprised with what I encounter. About my question, I am well aware that a lot of similar posts exists and, yes, I included WHERE $__timeFilter(DT)
in my query.
This will be my first post, so be nice
-
What Grafana version and what operating system are you using?
Grafana v8.5.3 (409e9bc9a)
Windows 10 enterprise 20h2
Chrome -
What are you trying to achieve?
Display data from a table from a timerange of my choosing -
How are you trying to achieve it?
I have the following query (formatted as table) which displays the data in a timeseries panel.
SELECT
DT AS "time"
, level
FROM
buffer
WHERE
$__timeFilter(DT)
ORDER BY DT`
The dashboard’s timepicker is set to a static time range, and then I use the <
>
buttons to move the time range back and forth. (Although the same behaviour can be replicated when manually adjusting the time range and using the apply time range
button, or when using a datalink/URL, without reloading the dashboard)
- What happened?
When navigating to a time range that doesn’t contain any data I get theData outside time range - zoom to data
message even though the query doesn’t return any data at all. The funny thing is, this only happens when the panel contained data before the redraw. If I hit refresh (or wait 5 seconds for the auto-refresh to kick in) the message disappears and the panel shows an empty graph (as expected). When navigating to this timerange from another time that also didn’t contain data, the message doesn’t show up.
Consider the following setup:
The timeseries panel on the left contains the query, the table panel on the right has the left panel set as datasource. The time range is set to 07:30 → 08:30, data collection started at 8:19, this renders without any trouble.
Next, I move the timeframe back half an hour to 07:00 → 08:00
and then this happens:
I believe this is a bug, the panel indicates that the data is outside of the time range, but there is no data at all, as is shown by the table panel. When navigating to this time range from say 06:00 → 07:00 it wont trigger the message. Pressing ‘refresh’ causes the panel to reload and also removes the message.
-
What did you expect to happen?
I expected the panel to show an empty graph without the “data outside time range” message -
Can you copy/paste the configuration(s) that you are having problems with?
no special configuration used, left everything as default on a clean dashboard. -
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
Grafana did not provide any error pop-ups. There were no error icons in the panel. Chrome’s console log doesn’t throw any errors either -
Did you follow any online instructions? If so, what is the URL?
n/a
I hope I provided enough information and I look forward to a solution.
Regards,
Guido