grafana/docs/sources/panels-visualizations/query-transform-data/share-query/index.md
Christopher Moyer 414d536186
Docs: refactors config panels and visualizations, corrects relrefs (#55940)
* refactors config panels and visualizations, corrects relrefs

* adds an alias

* Remove some old content

* moves visualizations topic to the root

* moves out panels and visualization topics to the root

* adds move and resize panel to add/organize panel; creates a create dashboard topic under build dashboards; adjusts context of add a panel to be from within an existing dashboard

* updates aliases

* creates search at root, moves dashboard preview to search, creates standalone search dashboard topic

* moves Set dashboard time range to use-dashboards, creates modify dashboard settings and adds moves Modify dashboard time settings to that topic

* moves existing query-options topic from working with panels to configure-panel-visualizations, moves panel time overrides and timeshift content to query options

* Moving things to better category, fixing links, improving ordering

* Move panel inspector to main panel topic

* completes partial fix of relrefs

* relref fixes con't

* restructures remaining panels topics

* more relref fixes

* Minor fix

* Minor tweak

* finishes fixing relrefs

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-10-11 15:31:20 -05:00

1.7 KiB
Raw Blame History

aliases title menuTitle weight
/docs/grafana/latest/panels/query-a-data-source/share-query/
/docs/grafana/latest/panels-visualizations/query-transform-data/share-query/
Share query results with another panel Share query results 60

Share query results with another panel

Grafana let 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]({{< relref "../../../dashboards/build-dashboards/create-dashboard/" >}}).

  2. Change the title to "Source panel". You'll use this panel as a source for the other panels.

  3. Define the [query]({{< relref "../#add-a-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.

  4. Add a second panel and select the Dashboard data source in the query editor.

  5. 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 made 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.