Grafana Series (VIII): Inspector in Grafana Explore

This article was last updated on: February 7, 2024 pm



Inspector in Explore. The checker can help you understand and troubleshoot your query. You can examine the raw data and export it to a CSV file.

The Inspector helps you understand and troubleshoot your queries. You can examine raw data, export it to a comma-separated numeric value (CSV) file, export log results in TXT format, and view query requests.

Inspector UI

The inspector has the following tabs.

  • Statistics tab - Shows how long your query takes and how much data it returns.
  • Query labels - Shows the requests made to the server when Grafana queries the data source.
  • JSON tags - Allows you to view and copy JSON data and JSON data frame structures.
  • Data labels - Displays the raw data returned by the query.
  • Errors tab - Display error. Visible only if the query returns an error.

Inspector tasks

You can perform a variety of tasks in the Explore inspector.

Open the inspector

  1. Run the query you want to check.
  2. ClickInspectorButton.

The Inspector pane opens at the bottom of the screen.

Check the original query results

You can view the original query results, which is the data returned by the query in the table.

atInspectortab, clickdataLabel.

There are additional options for multiple queries or querying multiple nodes.

  • Display the data frame: Select the result set data you want to view.
  • Connected series by time: View the raw data for all your queries at once, one result set per column. You can click on a column header to sort the data.

Download the original query result as CSV

Grafana generates a CSV file in your default browser download location. You can open it in the viewer of your choice.

  1. atInspectortab, follow Check the original query resultsThe instructions in the original query results.
  2. Refine the query settings until you can see the raw data you want to output.
  3. clickDownload the CSV

In order to download a CSV file specifically for Excel format, expand itData options, then click on Download the CSVoption before you enable itDownload Excelswitch.

Download the log results in TXT format

Grafana generates a TXT file in your default browser download location. You can open it in the viewer of your choice.

  1. Open the inspector.
  2. Check the log query results as described above.
  3. ClickDownload the logs

Download the trace results

Depending on the data source type, Grafana generates a JSON file for trace results, supported in Jaeger, Zipkin, or OTLP formats.

  1. Open the inspector.
  2. Check the tracking query results Mentioned above
  3. clickDownload trace

Check query performance

The Statistics tab displays statistics that tell you how long your query takes, how many queries you send, and how many rows are returned. This information can help you troubleshoot your query, especially if any number is unexpectedly high or low.

  1. Open the inspector.
  2. Navigate tostatisticsLabel.

Statistics are displayed in a read-only format.

Check out the JSON model

You can browse and export data as well as DataFrame JSON models.

  1. On the Inspector panel, clickJSONLabel.
  2. From the Select Source drop-down menu, select one of the following options.
    • data - Displays a JSON object that represents the data returned to Explore.
    • DataFrame structure - Displays the original result set.
  3. You can expand or collapse parts of the JSON to see individual sections. You can also clickCopy to clipboardoption to copy the JSON body and paste it into another application.

View the original request and response to the data source

  1. Open the Inspector panel and tapInquireLabel.
  2. clickflushed

Grafana sends the query to the server and displays the results. You can drill into specific parts of a query, expand or collapse all queries, or copy data to the clipboard for use in other applications.

Grafana series of articles

Grafana series of articles