Grafana Series (VIII): Inspector in Grafana Explore
This article was last updated on: July 24, 2024 am
👉️URL: https://grafana.com/docs/grafana/latest/explore/explore-inspector/
📝Description:
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
- Run the query you want to check.
- 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.
- atInspectortab, follow Check the original query resultsThe instructions in the original query results.
- Refine the query settings until you can see the raw data you want to output.
- 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.
- Open the inspector.
- Check the log query results as described above.
- 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.
- Open the inspector.
- Check the tracking query results Mentioned above。
- 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.
- Open the inspector.
- 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.
- On the Inspector panel, clickJSONLabel.
- 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.
- 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
- Open the Inspector panel and tapInquireLabel.
- 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.