mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Docs: Add documentation for inspector in Explore (#33408)
* Add documentatio for Inspector in Explore and Download logs * Update title * Update public/app/features/explore/ExploreQueryInspector.tsx * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Reords tabs, add error tab * Update docs/sources/panels/inspect-panel.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Update docs/sources/explore/explore-inspector.md * Remove numbered steps in inspector Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,7 @@ If you just want to explore your data and do not want to create a dashboard, the
|
||||
- [Query management in Explore]({{< relref "query-management.md" >}})
|
||||
- [Logs integration in Explore]({{< relref "logs-integration.md" >}})
|
||||
- [Trace integration in Explore]({{< relref "trace-integration.md" >}})
|
||||
- [Inspector in Explore]({{< relref "explore-inspector.md" >}})
|
||||
|
||||
## Start exploring
|
||||
|
||||
@@ -22,9 +23,9 @@ In order to access Explore, you must have an editor or an administrator role. Re
|
||||
To access Explore:
|
||||
|
||||
1. Click on the Explore icon on the menu bar.
|
||||
|
||||
|
||||
{{< docs-imagebox img="/img/docs/explore/access-explore-7-4.png" max-width= "650px" caption="Screenshot of the new Explore Icon" >}}
|
||||
|
||||
|
||||
An empty Explore tab opens.
|
||||
|
||||
Alternately to start with an existing query in a panel, choose the Explore option from the Panel menu. This opens an Explore tab with the query from the panel and allows you to tweak or iterate in the query outside of your dashboard.
|
||||
@@ -41,7 +42,7 @@ The split view provides an easy way to compare graphs and tables side-by-side or
|
||||
To open the split view:
|
||||
|
||||
1. Click the split button to duplicate the current query and split the page into two side-by-side queries.
|
||||
|
||||
|
||||
It is possible to select another data source for the new query which for example, allows you to compare the same query for two different servers or to compare the staging environment to the production environment.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/explore/explore_split-7-4.png" max-width= "950px" caption="Screenshot of Explore option in the panel menu" >}}
|
||||
|
84
docs/sources/explore/explore-inspector.md
Normal file
84
docs/sources/explore/explore-inspector.md
Normal file
@@ -0,0 +1,84 @@
|
||||
+++
|
||||
title = "Inspector in Explore"
|
||||
weight = 400
|
||||
+++
|
||||
|
||||
# Inspector in Explore
|
||||
|
||||
The inspector helps you understand and troubleshoot your queries. You can inspect the raw data, export that data to a comma-separated values (CSV) file, export log results in TXT format, and view query requests.
|
||||
|
||||
## Inspector UI
|
||||
|
||||
The inspector has following tabs:
|
||||
|
||||
- **Stats tab -** Shows how long your query takes and how much it returns.
|
||||
- **Query tab -** Shows you the requests to the server sent when Grafana queries the data source.
|
||||
- **JSON tab -** Allows you to view and copy the data JSON and data frame structure JSON.
|
||||
- **Data tab -** Shows the raw data returned by the query.
|
||||
- **Error tab -** Shows the error. Only visible when query returns error.
|
||||
|
||||
## Inspector tasks
|
||||
|
||||
You can perform a variety of tasks in the Explore inspector.
|
||||
|
||||
### Open the Inspector
|
||||
|
||||
1. Run the query you would like to inspect.
|
||||
1. Click the **Inspector** button.
|
||||
|
||||
The inspector pane opens on the bottom of the screen.
|
||||
|
||||
### Inspect raw query results
|
||||
|
||||
You can view raw query results, that is the data returned by the query in a table.
|
||||
|
||||
In the **Inspector** tab, click the **Data** tab.
|
||||
|
||||
For multiple queries or for queries multiple nodes, there are additional options.
|
||||
|
||||
- **Show data frame:** Select the result set data you want to view.
|
||||
- **Series joined by time:** View the raw data from all of your queries at once, one result set per column. You can click a column heading to sort the data.
|
||||
|
||||
### Download raw query results as CSV
|
||||
|
||||
Grafana generates a CSV file in your default browser download location. You can open it in the viewer of your choice.
|
||||
|
||||
1. In the **Inspector** tab, raw query results following instructions in (### Inspect raw query results).
|
||||
1. Refine query settings until you can see the raw data that you want to export.
|
||||
1. Click **Download CSV**.
|
||||
|
||||
In order to download a CSV file specifically formatted for Excel, expand **Data options** and then enable the **Download for Excel** toggle before you click the **Download CSV** option.
|
||||
|
||||
### Download log results as TXT
|
||||
|
||||
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.
|
||||
1. Inspect the log query results as described above.
|
||||
1. Click **Download logs**.
|
||||
|
||||
### Inspect query performance
|
||||
|
||||
The Stats tab displays statistics that tell you how long your query takes, how many queries you send, and the number of rows returned. This information can help you troubleshoot your queries, especially if any of the numbers are unexpectedly high or low.
|
||||
|
||||
1. Open the inspector.
|
||||
1. Navigate to the **Stats** tab.
|
||||
|
||||
Statistics are displayed in read-only format.
|
||||
|
||||
### View JSON model
|
||||
|
||||
You can explore and export data as well as data frame JSON models.
|
||||
|
||||
1. In the Inspector panel, click the **JSON** tab.
|
||||
1. From the Select source dropdown, choose one of the following options:
|
||||
- **Data -** Displays a JSON object representing the data that was returned to Explore.
|
||||
- **DataFrame structure -** Displays the raw result set.
|
||||
1. You can expand or collapse portions of the JSON to view separate sections. You can also click the **Copy to clipboard** option to copy JSON body and paste it into another application.
|
||||
|
||||
### View raw request and response to data source
|
||||
|
||||
1. Open the panel inspector and then click the **Query** tab.
|
||||
1. Click **Refresh**.
|
||||
|
||||
Grafana sends the query to the server and displays the result. You can drill down on specific portions of the query, expand or collapse all of it, or copy the data to the clipboard to use in other applications.
|
@@ -13,16 +13,18 @@ The panel inspector helps you understand and troubleshoot your panels. You can i
|
||||
|
||||
The panel inspector displays Inspect: <NameOfPanelBeingInspected> at the top of the pane. Click the arrow in the upper right corner to expand or reduce the pane.
|
||||
|
||||
The panel inspector consists of four tabs:
|
||||
The panel inspector consists of following tabs:
|
||||
|
||||
- **Data tab -** Shows the raw data returned by the query with transformations applied. Field options such as overrides and value mappings are not applied by default.
|
||||
- **Stats tab -** Shows how long your query takes and how much it returns.
|
||||
- **JSON tab -** Allows you to view and copy the panel JSON, panel data JSON, and data frame structure JSON. This is useful if you are provisioning or administering Grafana.
|
||||
- **Query tab -** Shows you the requests to the server sent when Grafana queries the data source.
|
||||
- **Error tab -** Shows the error. Only visible when query returns error.
|
||||
|
||||
> **Note:** Not all panel types include all four tabs. For example, dashboard list panels do not have raw data to inspect, so they do not display the Stats, Data, or Query tabs.
|
||||
|
||||
## Panel inspector tasks
|
||||
|
||||
Tasks you can perform in the panel inspector are described below.
|
||||
|
||||
### Open the panel inspector
|
||||
@@ -40,13 +42,17 @@ The panel inspector pane opens on the right side of the screen.
|
||||
|
||||
View raw query results in a table. This is the data returned by the query with transformations applied and before the panel applies field options or field option overrides.
|
||||
|
||||
1. Open the panel inspector and then click the **Data** tab or in the panel menu click **Inspect > Data**.
|
||||
1. If your panel contains multiple queries or queries multiple nodes, then you have additional options.
|
||||
In the inspector click the **Data** tab or in the panel menu click **Inspect > Data**.
|
||||
|
||||
If your panel contains multiple queries or queries multiple nodes, then you have additional options.
|
||||
|
||||
- **Select result -** Choose which result set data you want to view.
|
||||
- **Transform data**
|
||||
|
||||
- **Join by time -** View raw data from all your queries at once, one result set per column. Click a column heading to reorder the data.
|
||||
|
||||
View raw query results in a table with field options and options overrides applied:
|
||||
|
||||
1. Open the **Data** tab in panel inspector.
|
||||
1. Click on **Data display options** above the table.
|
||||
1. Click on **Apply field configuration** toggle button.
|
||||
@@ -61,6 +67,14 @@ Grafana generates a CSV file in your default browser download location. You can
|
||||
|
||||
To download a CSV file specifically formatted for Excel, expand the **Data options** panel and enable the **Download for Excel** toggle before clicking **Download CSV**.
|
||||
|
||||
### Download log results as TXT
|
||||
|
||||
Grafana generates a text file in your default browser download location. You can open the log in the viewer of your choice.
|
||||
|
||||
1. Open the panel inspector.
|
||||
1. Inspect the log query results as described above.
|
||||
1. Click **Download logs**.
|
||||
|
||||
### Inspect query performance
|
||||
|
||||
The Stats tab displays statistics that tell you how long your query takes, how many queries you send, and the number of rows returned. This information can help you troubleshoot your queries, especially if any of the numbers are unexpectedly high or low.
|
||||
|
Reference in New Issue
Block a user