mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 21:52:23 +08:00

* Update dashboards pages to use `docs/reference` shortcode Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Update panels-visualizations pages to use `docs/reference` shortcode Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Use raw Markdown admonitions for contextual links See https://discourse.gohugo.io/t/markdown-reference-links-in-shortcodes/5770/3. Should be resolved by https://docs.google.com/document/d/19xd4CD3IrAqQqNR3xQeLfuIV-u2iNSQSBEvPZE9J4qU/edit#heading=h.5sybau7waq2q. Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Prefer "Warning" over "Caution" Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * Prettier Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix some links missing destinations Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix 'time range controls' link Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Add missing 'HTTP APIs' link Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix dashboard links missing destinations Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix links missing destinations in panels and visualizations documentation Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix dud link Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> --------- Signed-off-by: Jack Baldry <jack.baldry@grafana.com> Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
42 lines
2.1 KiB
Markdown
42 lines
2.1 KiB
Markdown
---
|
||
aliases:
|
||
- ../../panels/query-a-data-source/share-query/
|
||
labels:
|
||
products:
|
||
- cloud
|
||
- enterprise
|
||
- oss
|
||
menuTitle: Share query results
|
||
title: Share query results with another panel
|
||
weight: 60
|
||
---
|
||
|
||
# Share query results with another panel
|
||
|
||
Grafana lets you use the query result from one panel for any other panel in the dashboard. Sharing query results across panels reduces the number of queries made to your data source, which can improve the performance of your dashboard.
|
||
|
||
The Dashboard data source lets you select a panel in your dashboard that contains the queries you want to share the results for. Instead of sending a separate query for each panel, Grafana sends one query and other panels use the query results to construct visualizations.
|
||
|
||
This strategy can drastically reduce the number of queries being made when you for example have several panels visualizing the same data.
|
||
|
||
1. [Create a dashboard][].
|
||
1. Change the title to "Source panel". You'll use this panel as a source for the other panels.
|
||
1. Define the [query][] or queries that you want share.
|
||
|
||
If you don't have a data source available, use the **Grafana** data source, which returns a random time series that you can use for testing.
|
||
|
||
1. Add a new panel and select the **Dashboard** data source in the query editor.
|
||
1. In the **Use results from panel list**, select the first panel you created.
|
||
|
||
All queries defined in the source panel are now available to the new panel. Queries defined in the source panel can be shared with multiple panels.
|
||
|
||
You can click on any of the queries to go to the panel where they are defined.
|
||
|
||
{{% docs/reference %}}
|
||
[Create a dashboard]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/build-dashboards/create-dashboard"
|
||
[Create a dashboard]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/build-dashboards/create-dashboard"
|
||
|
||
[query]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/panels-visualizations/query-transform-data#add-a-query"
|
||
[query]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/panels-visualizations/query-transform-data#add-a-query"
|
||
{{% /docs/reference %}}
|