How To Use Grafana's Query Inspector to troubleshoot issues

Query Inspector is a new feature that was added to Grafana v4.5. It shows query requests and responses.
This can be helpful if a graph is not shown or shows something very different than what you expected.
Depending on the data source the response will look different.

The Query Inspector can be found under the metrics tab inside panel edit mode.

First you should check and see if there is anything unexpected or wrong in the query Grafana sends to your database or in the response.

ex:


Here there is no graph so I click Query Inspector to open the Query Inspector.


In Query Inspector I can see the query and that it is getting a response. To see the response I can click Expand All or as in this case datapoints. (Be careful if you Expand All since there can be a lot of data). All the nodes can be opened and closed by clicking on them.


I can now see that data is being returned and the reason I cannot see the graph is that the value is null.

If you think Grafana is showing the data incorrectly then you can open a bug report.
Copy the response by clicking Copy to Clipboard (All the data will be copied wether expanded or not).


Paste it with your question(remove any sensitive data).

3 Likes

At the risk of sounding obtuse… I came to the documentation to find out how to GET TO the query inspector, however I cannot find it in 4.6.2 and this document fails to start off with navigating to the query inspector view.

To make matters worse, googling for how to get to the view keeps taking me back to this document.

A post was merged into an existing topic: Give me an example query sql for panel G3 Gauge table

A post was split to a new topic: Influxdb has different timezone - problem with query

The documentation for the Inspect Panel feature is also useful. These docs are current as of Grafana 8"

And here is an example of the query inspector on our public sandbox, play.grafana.org