NULL series in query response in graph panel


I’m using Grafana v6.6.2 (3fa63cfc34) on Ubuntu with timescaledb as datasource.

I need to display a graph panel with 6 queries.
Queries can take up to 30 seconds.

Using Chrome developer tools I’ve verified that queries are correctly sent to the server.

As you can see the queries are not all displayed and there are some visualization issues.

Using query inspector I’ve noticed some queries have “Series” field set to null. Every time I reload the dashboard, queries that are not displayed change.

Is this a bug or a problem of my queries?

Thanks in advance for answers and help.

What do you mean by Queries are not displayed. Query are part of metadata for every Ref object.
Also, the objects will have series only if they find any data for the queries.
Also, looking at the query you have here is missing, ‘order by time’ clause, which is important when it comes to displaying data in timeseries.
To add the order by clause, you have to go to Query panel editor for this graph panel. Let me know if this solves your actual problem of weird graph.

Thank you for the advice of always using “order by time”: It seems to fix the uncorrect visualization of “lines”.

What I mean by Queries are not displayed is that as you can see in the first screenshot the queries are 6 (A B C D E F) but in the graph panel are only displayed 5 graph. It is also a fortunate example, because in the major part of the times only 3 queries are displayed.

MODIFIED: I’m sure that all the queries return data

well, in your first screenshot, out of 6 queries one ‘D’ did not return you the data as you can see series = null, but for rest 5 it returned the series and hence displaying 5 series in the graph. Looks like each query returned one single series.
I am still not sure, why would query change as they are fixed for any panel once written. You can take a look at query editor and ‘Generated SQL’ (note: you have to click once in the query editor and then outside of query editor to trigger the query and hence to view it in ‘Generated SQL’ section there on editor itself) This will tell you if that query is right or not and whether it alone returns any data by looking at network profile response tab.
Hope these points help you.

I post other screenshots to better explain my problem. These refer to the same graph, simply reloading queries (following your suggestion about clicking).

I also notice executed and displayed queries have the “Generate SQL” button, whereas the others don’t.