Docs: Create new landing page and Get started doc for Explore (#91602)

* started updates

* added descriptions

* changed some wording

* minor updates

* updates

* updates

* created new landing page, and the get started page

* finished creating landing page

* continued with restructure

* final edits

* updated the Explore landing page

* ran prettier

* Update docs/sources/explore/get-started-with-explore.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/explore/get-started-with-explore.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/explore/get-started-with-explore.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/explore/get-started-with-explore.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/explore/get-started-with-explore.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/explore/get-started-with-explore.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/explore/get-started-with-explore.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/explore/get-started-with-explore.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* updates based on Jack's feedback

* ran prettier a second time

* wording change on landing page

* removed uncommented section

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
pull/92087/head
Larissa Wandzura 9 months ago committed by GitHub
parent e2a1d59a96
commit 7ff8b1e0e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 188
      docs/sources/explore/_index.md
  2. 208
      docs/sources/explore/get-started-with-explore.md

@ -10,159 +10,53 @@ labels:
- cloud
- enterprise
- oss
menuTitle: Explore
title: Explore
weight: 90
hero:
title: Explore
level: 1
width: 110
height: 110
description: >-
Use Explore to query, collect, and analyze data for detailed real-time data analysis.
cards:
title_class: pt-0 lh-1
items:
- title: Get started with Explore
href: ./get-started-with-explore/
description: Get started using Explore to create queries and do real-time analysis on your data.
height: 24
- title: Query management
href: ./query-management/
description: Learn how to manage queries in Explore.
height: 24
- title: Query inspector in Explore
href: ./explore-inspector/
description: Learn how to use the Query inspector to troubleshoot issues with your queries.
height: 24
- title: Logs in Explore
href: ./logs-integration/
description: Learn about working with logs and log data in Explore.
height: 24
- title: Traces in Explore
href: ./trace-integration/
description: Learn about working with traces and tracing data in Explore.
height: 24
- title: Correlations editor in Explore
href: ./correlations-editor-in-explore/
description: Learn how to create and use Correlations.
height: 24
---
# Explore
{{< docs/hero-simple key="hero" >}}
Grafana's dashboard UI is all about building dashboards for visualization. Explore strips away the dashboard and panel options so that you can focus on the query. It helps you iterate until you have a working query and then think about building a dashboard.
> Refer to [Role-based access control]({{< relref "../administration/roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can control access with role-based permissions.
If you just want to explore your data and do not want to create a dashboard, then Explore makes this much easier. If your data source supports graph and table data, then Explore shows the results both as a graph and a table. This allows you to see trends in the data and more details at the same time. See also:
- [Query management in Explore]({{< relref "query-management/" >}})
- [Logs integration in Explore]({{< relref "logs-integration/" >}})
- [Trace integration in Explore]({{< relref "trace-integration/" >}})
- [Explore metrics]({{< relref "explore-metrics/" >}})
- [Correlations Editor in Explore]({{< relref "correlations-editor-in-explore/" >}})
- [Inspector in Explore]({{< relref "explore-inspector/" >}})
## Start exploring
{{< youtube id="1q3YzX2DDM4" >}}
> Refer to [Role-based access Control]({{< relref "../administration/roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can manage Explore with role-based permissions.
In order to access Explore, you must have an editor or an administrator role, unless the [viewers_can_edit option]({{< relref "../setup-grafana/configure-grafana/#viewers_can_edit" >}}) is enabled. Refer to [About users and permissions]({{< relref "../administration/roles-and-permissions/" >}}) for more information on what each role has access to.
{{% admonition type="note" %}}
If you are using Grafana Cloud, open a [support ticket in the Cloud Portal](/profile/org#support) to enable the `viewers_can_edit` option
{{% /admonition %}}
To access Explore:
1. Click on the Explore icon on the menu bar.
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.
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-panel-menu-10.1.png" class="docs-image--no-shadow" max-width= "650px" caption="Screenshot of the panel menu including the Explore option" >}}
1. Choose your data source from the drop-down in the top left.
You can also click **Open advanced data source picker** to see more options, including adding a data source (Admins only).
1. Write the query using a query editor provided by the selected data source. Please check [data sources documentation]({{< relref "../datasources" >}}) to see how to use various query editors.
1. For general documentation on querying data sources in Grafana, see [Query and transform data]({{< relref "../panels-visualizations/query-transform-data" >}}).
1. Run the query using the button in the top right corner.
## Split and compare
The split view provides an easy way to compare visualizations side-by-side or to look at related data together on one page.
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.
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-explore-split-10.1.png" max-width= "950px" caption="Screenshot of Explore screen split" >}}
In split view, timepickers for both panels can be linked (if you change one, the other gets changed as well) by clicking on one of the time-sync buttons attached to the timepickers. Linking of timepickers helps with keeping the start and the end times of the split view queries in sync. It ensures that you’re looking at the same time interval in both split panels.
To close the newly created query, click on the Close Split button.
## Content outline
The content outline is a side navigation bar that keeps track of the queries and visualization panels you created in Explore. It allows you to navigate between them quickly.
The content outline also works in a split view. When you are in split view, the content outline is generated for each pane.
To open the content outline:
1. Click the Outline button in the top left corner of the Explore screen.
You can then click on any panel icon in the content outline to navigate to that panel.
### Filter logs in content outline
When using Explore with logs, you can filter the logs in the content outline. You can filter by log level, which is currently supported for Elasticsearch and Loki data sources. To select multiple filters, press Command-click on a Mac or Ctrl+Click in Windows.
{{% admonition type="note" %}}
Log levels only show if the datasource supports the log volume histogram and contains multiple levels. Additionally, the query to the data source may have to format the log lines to see the levels. For example, in Loki, the `logfmt` parser commonly will display log levels.
{{% /admonition %}}
{{< figure src="/media/docs/grafana/explore/screenshot-explore-content-outline-logs-filtering-11.2.png" max-width= "950px" caption="Screenshot of Explore content outline logs filtering" >}}
### Pin logs to content outline
When using Explore with logs, you can pin logs to content outline by hovering over a log in the logs panel and clicking on the _Pin to content outline_ icon in the log row menu.
{{< figure src="/media/docs/grafana/explore/screenshot-explore-content-outline-logs-pinning-11.2.png" max-width= "450px" caption="Screenshot of Explore content outline logs pinning" >}}
Clicking on a pinned log opens the [log context modal](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/logs-integration/#log-context), showing the log highlighted in context with other logs. From here, you can also open the log in split mode to preserve the time range in the left pane while having the time range specific to that log in the right pane.
## Share Explore URLs
When using Explore, the URL in the browser address bar updates as you make changes to the queries. You can share or bookmark this URL.
{{% admonition type="note" %}}
Explore may generate relatively long URLs, some tools, like messaging or videoconferencing apps, may truncate messages to a fixed length. In such cases Explore will display a warning message and load a default state. If you encounter issues when sharing Explore links in such apps, you can generate shortened links. See [Share shortened link](#share-shortened-link) for more information.
{{% /admonition %}}
### Generating Explore URLs from external tools
Because Explore URLs have a defined structure, you can build a URL from external tools and open it in Grafana. The URL structure is:
```
http://<grafana_url>/explore?panes=<panes>&schemaVersion=<schema_version>&orgId=<org_id>
```
where:
- `org_id` is the organization ID
- `schema_version` is the schema version (should be set to the latest version which is `1`)
- `panes` is a url-encoded JSON object of panes, where each key is the pane ID and each value is an object matching the following schema:
```
{
datasource: string; // the pane's root datasource UID, or `-- Mixed --` for mixed datasources
queries: {
refId: string; // an alphanumeric identifier for this query, must be unique within the pane, i.e. "A", "B", "C", etc.
datasource: {
uid: string; // the query's datasource UID ie: "AD7864H6422"
type: string; // the query's datasource type-id, i.e: "loki"
}
// ... any other datasource-specific query parameters
}[]; // array of queries for this pane
range: {
from: string; // the start time, in milliseconds since epoch
to: string; // the end time, in milliseconds since epoch
}
}
```
{{% admonition type="note" %}}
The `from` and `to` also accept relative ranges defined in [Time units and relative ranges]({{< relref "../dashboards/use-dashboards/#time-units-and-relative-ranges" >}}).
{{% /admonition %}}
## Share shortened link
{{% admonition type="note" %}}
Available in Grafana 7.3 and later versions.
{{% /admonition %}}
The Share shortened link capability allows you to create smaller and simpler URLs of the format /goto/:uid instead of using longer URLs with query parameters. To create a shortened link to the executed query, click the **Share** option in the Explore toolbar.
---
A shortened link that is not accessed will automatically get deleted after a [configurable period](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#short_links) (defaulting to seven days). If a link is used at least once, it won't be deleted.
## Overview
### Sharing shortened links with absolute time
Explore is your starting point for querying, analyzing, and aggregating data in Grafana. You can quickly begin creating queries to start analyzing data without having to create a dashboard or customize a visualization.
{{% admonition type="note" %}}
Available in Grafana 10.3 and later versions.
{{% /admonition %}}
## Explore
Short links have two options - keeping relative time (for example, from two hours ago to now) or absolute time (for example, from 8am to 10am). Sharing a shortened link by default will copy the time range selected, relative or absolute. Clicking the dropdown button next to the share shortened link button and selecting one of the options under "Time-Sync URL Links" will allow you to create a short link with the absolute time - meaning anyone receiving the link will see the same data you are seeing, even if they open the link at another time. This will not affect your selected time range.
{{< card-grid key="cards" type="simple" >}}

@ -0,0 +1,208 @@
---
aliases:
-
keywords:
- explore
- loki
- logs
labels:
products:
- cloud
- enterprise
- oss
title: Get started with Explore
weight: 5
---
# Get started with Explore
Explore is your gateway for querying, analyzing, and aggregating data in Grafana. It allows you to visually explore and iterate until you develop a working query or set of queries for building visualizations and conducting data analysis. If your data source supports graph and table data, there's no need to create a dashboard, as Explore can display the results in both formats. This facilitates quick, detailed, real-time data analysis.
With Explore you can:
- Create visualizations to integrate into your dashboards.
- Create queries using mixed data sources.
- Create multiple queries within a single interface.
- Understand the shape of your data across various data sources.
- Perform real time data exploration and analysis.
Key features include:
- Query editor, based on specific data source, to create and iterate queries.
- [Query history](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/query-management/) to track and maintain your queries.
- [Query inspector](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/explore-inspector/) to help troubleshoot query performance.
Watch the following video to get started using Explore:
{{< youtube id="1q3YzX2DDM4" >}}
## Before you begin
In order to access Explore, you must have either the `editor` or `administrator` role, unless the [`viewers_can_edit` option](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#viewers_can_edit) is enabled. Refer to [Role and permissions](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/) for more information on what each role can access.
Refer to [Role-based access control (RBAC)](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/) in Grafana Enterprise to understand how you can manage Explore with role-based permissions.
{{< admonition type="note" >}}
If you are using Grafana Cloud, open a [support ticket in the Cloud Portal](/https://grafana.com/auth/sign-in) to enable the `viewers_can_edit` option.
{{< /admonition >}}
## Explore elements
Explore consists of a toolbar, outline, query editor, the ability to add multiple queries, a query history and a query inspector.
- **Outline** - Keeps track of the queries and visualization panels created in Explore. Refer to [Content outline](#content-outline) for more detail.
- **Toolbar** - Provides quick access to frequently used tools and settings.
- **Data source picker** - Select a data source from the dropdown menu, or use absolute time.
- **Split** - Click to compare visualizations side by side. Refer to [Split and compare](#split-and-compare) for additional detail.
- **Add** - Click to add your exploration to a dashboard. You can also use this to declare an incident,create a forecast, detect outliers and to run an investigation.
- **Time picker** - Select a time range form the time picker. You can also enter an absolute time range. Refer to [Time picker](#time-picker) for more information.
- **Run query** - Click to run your query.
- **Query editor** - Interface where you construct the query for a specific data source. Query editor elements differ based on data source. In order to run queries across multiple data sources you need to select **Mixed** from the data source picker.
- **+Add query** - Add additional queries.
- **Query history** - Query history contains the list of queries that you created in Explore. Refer to [Query history](/docs/grafana/<GRAFANA_VERSION>/explore/query-management/#query-history) for detailed information on working with your query history.
- **Query inspector** - Provides detailed statistics regarding your query. Inspector functions as a kind of debugging tool that "inspects" your query. It provides query statistics under **Stats**, request response time under **Query**, data frame details under **{} JSON**, and the shape of your data under **Data**. Refer to [Query inspector in Explore](/docs/grafana/latest/explore/explore-inspector/) for additional information.
## Access Explore
To access Explore:
1. Click on **Explore** in the left side menu.
To start with an existing query from a dashboard panel, select the Explore option from the Panel menu in the upper right. This opens an Explore page with the panel's query, enabling you to tweak or iterate the query outside your dashboard.
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-panel-menu-10.1.png" class="docs-image--no-shadow" caption="Panel menu with Explore option" >}}
1. Select a data source from the drop-down in the upper left.
1. Using the query editor provided for the specific data source, begin writing your query. Each query editor differs based on each data source's unique elements.
Some query editors provide a **Kick start your query** option, which gives you a list of basic pre-written queries. Refer to [Use query editors](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/#use-query-editors) to see how to use various query editors. For general information on querying data sources in Grafana, refer to [Query and transform data](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/).
Based on specific data source, certain query editors allow you to select the label or labels to add to your query. Labels are fields that consist of key/value pairs representing information in the data. Some data sources allow for selecting fields.
1. Click **Run query** in the upper right to run your query.
## Content outline
The content outline is a side navigation bar that keeps track of the queries and visualizations you created in Explore. It allows you to navigate between them quickly.
The content outline works in a split view, with a separate outline generated for each pane.
To open the content outline:
1. Click the Outline button in the top left corner of the Explore screen.
You can then click on any panel icon in the content outline to navigate to that panel.
## Split and compare
The split view enables easy side-by-side comparison of visualizations or simultaneous viewing of related data on a single page.
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.
1. Run and re-run queries as often as needed.
You can select a different data source, or different metrics and label filters for the new query, allowing you to compare the same query across two different servers or compare the staging environment with the production environment.
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-explore-split-10.1.png" max-width= "950px" caption="Screenshot of Explore screen split" >}}
You can also link the time pickers for both panels by clicking on one of the time-sync buttons attached to the time pickers. When linked, changing the time in one panel automatically updates the other, keeping the start and end times synchronized. This ensures that both split panels display data for the same time interval.
Click **Close** to quit split view.
## Time picker
Use the time picker to select a time range for your query. The default is **last hour**. You can select a different option from the dropdown or use an absolute time range. You can also change the timezone associated with the query, or use a fiscal year.
1. Click **Change time settings** to change the timezone or apply a fiscal year.
Refer to [Set dashboard time range](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/dashboards/use-dashboards/#set-dashboard-time-range) for more information on absolute and relative time ranges. You can also [control the time range using a URL](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/dashboards/use-dashboards/#control-the-time-range-using-a-url).
## Mixed data source
Select **Mixed** from the data source dropdown to run queries across multiple data sources in the same panel. When you select Mixed, you can select a different data source for each new query that you add.
## Share Explore URLs
When using Explore, the URL in the browser address bar updates as you make changes to the queries. You can share or bookmark this URL.
{{% admonition type="note" %}}
Explore may generate long URLs, which some tools, like messaging or videoconferencing applications, might truncate due to fixed message lengths. In such cases, Explore displays a warning and loads a default state.
If you encounter issues when sharing Explore links in these applications, you can generate shortened links. See [Share shortened link](#share-shortened-link) for more information.
{{% /admonition %}}
### Generate Explore URLs from external tools
Because Explore URLs have a defined structure, you can build a URL from external tools and open it in Grafana. The URL structure is:
```
http://<grafana_url>/explore?panes=<panes>&schemaVersion=<schema_version>&orgId=<org_id>
```
where:
- `org_id` is the organization ID
- `schema_version` is the schema version (should be set to the latest version which is `1`)
- `panes` is a URL-encoded JSON object of panes, where each key is the pane ID and each value is an object matching the following schema:
```
{
datasource: string; // the pane's root datasource UID, or `-- Mixed --` for mixed datasources
queries: {
refId: string; // an alphanumeric identifier for this query, must be unique within the pane, i.e. "A", "B", "C", etc.
datasource: {
uid: string; // the query's datasource UID ie: "AD7864H6422"
type: string; // the query's datasource type-id, i.e: "loki"
}
// ... any other datasource-specific query parameters
}[]; // array of queries for this pane
range: {
from: string; // the start time, in milliseconds since epoch
to: string; // the end time, in milliseconds since epoch
}
}
```
{{< admonition type="note" >}}
The `from` and `to` also accept relative ranges defined in [Time units and relative ranges](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/dashboards/use-dashboards/#time-units-and-relative-ranges).
{{< /admonition >}}
## Share shortened link
{{< admonition type="note" >}}
Available in Grafana 7.3 and later versions.
{{< /admonition >}}
The Share shortened link capability allows you to create smaller and simpler URLs of the format `/goto/:uid` instead of using longer URLs with query parameters. To create a shortened link to the executed query, click the **Share** option in the Explore toolbar.
A shortened link that's not accessed automatically gets deleted after a [configurable period](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#short_links), which defaults to seven days. However, if the link is accessed at least once, it will not be deleted.
### Share shortened links with absolute time
{{< admonition type="note" >}}
Available in Grafana 10.3 and later versions.
{{< /admonition >}}
Shortened links have two options: relative time (e.g., from two hours ago to now) or absolute time (e.g., from 8am to 10am). By default, sharing a shortened link copies the selected time range, whether it's relative or absolute.
To create a short link with an absolute time:
1. Click the dropdown button next to the share shortened link button.
1. Select one of the options under **Time-Sync URL Links**.
This ensures that anyone receiving the link will see the same data you see, regardless of when they open it. Your selected time range will remain unaffected.
## Next steps
Now that you are familiar with Explore you can:
- [Build dashboards](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/)
- Create a wide variety of [visualizations](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/)
- [Work with logs](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/logs-integration/)
- [Work with traces](https://grafana.com/docs/grafana/<GRAFANA_VERSION>)
- [Create and use correlations](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/correlations-editor-in-explore/)
Loading…
Cancel
Save