<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Graphite data source on Grafana Labs</title><link>https://grafana.com/docs/grafana/v9.5/datasources/graphite/</link><description>Recent content in Graphite data source on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/grafana/v9.5/datasources/graphite/index.xml" rel="self" type="application/rss+xml"/><item><title>Graphite query editor</title><link>https://grafana.com/docs/grafana/v9.5/datasources/graphite/query-editor/</link><pubDate>Thu, 12 Mar 2026 05:44:27 +0000</pubDate><guid>https://grafana.com/docs/grafana/v9.5/datasources/graphite/query-editor/</guid><content><![CDATA[&lt;h1 id=&#34;graphite-query-editor&#34;&gt;Graphite query editor&lt;/h1&gt;
&lt;p&gt;Grafana includes a Graphite-specific query editor to help you build queries.
The query editor helps you quickly navigate the metric space, add functions, and change function parameters.
It can handle all types of Graphite queries, including complex nested queries through the use of query references.&lt;/p&gt;
&lt;p&gt;For general documentation on querying data sources in Grafana, see &lt;a href=&#34;../../../panels-visualizations/query-transform-data/&#34;&gt;Query and transform data&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;view-the-raw-query&#34;&gt;View the raw query&lt;/h2&gt;
&lt;p&gt;To see the raw text of the query that Grafana sends to Graphite, click the &lt;strong&gt;Toggle text edit mode&lt;/strong&gt; (pencil) icon.&lt;/p&gt;
&lt;h2 id=&#34;choose-metrics-to-query&#34;&gt;Choose metrics to query&lt;/h2&gt;
&lt;p&gt;Click &lt;strong&gt;Select metric&lt;/strong&gt; to navigate the metric space.
Once you begin, you can use the mouse or keyboard arrow keys.
You can also select a wildcard and still continue.&lt;/p&gt;
&lt;div class=&#34;screenshot&#34; style=&#34;max-width:&#34;&gt;
  &lt;a href=&#34;/static/img/docs/graphite/graphite-query-editor.gif&#34; title=&#34;&#34;&gt;
    &lt;img alt=&#34;&#34; src=&#34;data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==&#34;
         data-src=&#34;/static/img/docs/graphite/graphite-query-editor-still.png&#34; class=&#34;screenshot__still lazyload&#34;&gt;
    &lt;img alt=&#34;&#34; src=&#34;/static/img/docs/graphite/graphite-query-editor.gif&#34; class=&#34;screenshot__animated-gif&#34;&gt;
    &lt;div class=&#34;screenshot__play&#34;&gt;
      &lt;i class=&#34;fa fa-play&#34;&gt;&lt;/i&gt;
    &lt;/div&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;h2 id=&#34;functions&#34;&gt;Functions&lt;/h2&gt;
&lt;p&gt;Click the plus icon next to &lt;strong&gt;Function&lt;/strong&gt; to add a function. You can search for the function or select it from the menu. Once
a function is selected, it will be added and your focus will be in the text box of the first parameter.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To edit or change a parameter, click on it and it will turn into a text box.&lt;/li&gt;
&lt;li&gt;To delete a function, click the function name followed by the x icon.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;screenshot&#34; style=&#34;max-width:&#34;&gt;
  &lt;a href=&#34;/static/img/docs/graphite/graphite-functions-demo.gif&#34; title=&#34;&#34;&gt;
    &lt;img alt=&#34;&#34; src=&#34;data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==&#34;
         data-src=&#34;/static/img/docs/graphite/graphite-functions-still.png&#34; class=&#34;screenshot__still lazyload&#34;&gt;
    &lt;img alt=&#34;&#34; src=&#34;/static/img/docs/graphite/graphite-functions-demo.gif&#34; class=&#34;screenshot__animated-gif&#34;&gt;
    &lt;div class=&#34;screenshot__play&#34;&gt;
      &lt;i class=&#34;fa fa-play&#34;&gt;&lt;/i&gt;
    &lt;/div&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Some functions like aliasByNode support an optional second argument. To add an argument, hover your mouse over the first argument and then click the &lt;code&gt;&#43;&lt;/code&gt; symbol that appears. To remove the second optional parameter, click on it and leave it blank and the editor will remove it.&lt;/p&gt;
&lt;p&gt;To learn more, refer to &lt;a href=&#34;https://graphite.readthedocs.io/en/latest/functions.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Graphite&amp;rsquo;s documentation on functions&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;sort-labels&#34;&gt;Sort labels&lt;/h3&gt;
&lt;p&gt;If you have the same labels on multiple graphs, they are both sorted differently and use different colors.&lt;/p&gt;
&lt;p&gt;To avoid this and consistently order labels by name, use the &lt;code&gt;sortByName()&lt;/code&gt; function.&lt;/p&gt;
&lt;h3 id=&#34;modify-the-metric-name-in-my-tables-or-charts&#34;&gt;Modify the metric name in my tables or charts&lt;/h3&gt;
&lt;p&gt;Use &lt;code&gt;alias&lt;/code&gt; functions, such as &lt;code&gt;aliasByNode()&lt;/code&gt; or &lt;code&gt;aliasSub()&lt;/code&gt;, to change metric names on Grafana tables or graphs.&lt;/p&gt;
&lt;h3 id=&#34;consolidate-data-points&#34;&gt;Consolidate data points&lt;/h3&gt;
&lt;p&gt;Grafana consolidates all Graphite metrics so that Graphite doesn&amp;rsquo;t return more data points than there are pixels in the graph.
By default, Grafana consolidates data points using the &lt;code&gt;avg&lt;/code&gt; function.
To control how Graphite consolidates metrics, use the Graphite &lt;code&gt;consolidateBy()&lt;/code&gt; function.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Legend summary values (max, min, total) can&amp;rsquo;t all be correct at the same time because they are calculated client-side by Grafana.
Depending on your consolidation function, only one or two can be correct at the same time.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;combine-time-series&#34;&gt;Combine time series&lt;/h3&gt;
&lt;p&gt;To combine time series, click &lt;strong&gt;Combine&lt;/strong&gt; in the &lt;strong&gt;Functions&lt;/strong&gt; list.&lt;/p&gt;
&lt;h3 id=&#34;select-and-explor-data-with-tags&#34;&gt;Select and explor data with tags&lt;/h3&gt;
&lt;p&gt;In Graphite, &lt;em&gt;everything&lt;/em&gt; is a tag.&lt;/p&gt;
&lt;p&gt;When exploring data, previously selected tags filter the remaining result set.
To select data, use the &lt;code&gt;seriesByTag&lt;/code&gt; function, which takes tag expressions (&lt;code&gt;=&lt;/code&gt;, &lt;code&gt;!=&lt;/code&gt;, &lt;code&gt;=~&lt;/code&gt;, &lt;code&gt;!=~&lt;/code&gt;) to filter timeseries.&lt;/p&gt;
&lt;p&gt;The Grafana query builder does this for you automatically when you select a tag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; The regular expression search can be slow on high-cardinality tags, so try to use other tags to reduce the scope first.
To help reduce the results, start by filtering on a particular name or namespace.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;nest-queries&#34;&gt;Nest queries&lt;/h2&gt;
&lt;p&gt;You can reference a query by the &amp;ldquo;letter&amp;rdquo; of its row, similar to a spreadsheet.&lt;/p&gt;
&lt;p&gt;If you add a second query to a graph, you can reference the first query by entering &lt;code&gt;#A&lt;/code&gt;.
This helps you build compounded queries.&lt;/p&gt;
&lt;h2 id=&#34;use-wildcards-to-make-fewer-queries&#34;&gt;Use wildcards to make fewer queries&lt;/h2&gt;
&lt;p&gt;To view multiple time series plotted on the same graph, use wildcards in your search to return all of the matching time series in one query.&lt;/p&gt;
&lt;p&gt;For example, to see how the CPU is being utilized on a machine, you can create a graph and use the single query &lt;code&gt;cpu.percent.*.g&lt;/code&gt; to retrieve all time series that match that pattern.
This is more efficient than adding a query for each time series, such as &lt;code&gt;cpu.percent.user.g&lt;/code&gt;, &lt;code&gt;cpu.percent.system.g&lt;/code&gt;, and so on, which results in many queries to the data source.&lt;/p&gt;
&lt;h2 id=&#34;apply-annotations&#34;&gt;Apply annotations&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;../../../dashboards/build-dashboards/annotate-visualizations/&#34;&gt;Annotations&lt;/a&gt; overlay rich event information on top of graphs.
You can add annotation queries in the Dashboard menu&amp;rsquo;s Annotations view.&lt;/p&gt;
&lt;p&gt;Graphite supports two ways to query annotations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A regular metric query, using the &lt;code&gt;Graphite query&lt;/code&gt; textbox.&lt;/li&gt;
&lt;li&gt;A Graphite events query, using the &lt;code&gt;Graphite event tags&lt;/code&gt; textbox with a tag, wildcard, or empty value&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;get-grafana-metrics-into-graphite&#34;&gt;Get Grafana metrics into Graphite&lt;/h2&gt;
&lt;p&gt;Grafana exposes metrics for Graphite on the &lt;code&gt;/metrics&lt;/code&gt; endpoint.
For detailed instructions, refer to &lt;a href=&#34;../../../setup-grafana/set-up-grafana-monitoring/&#34;&gt;Internal Grafana metrics&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;integration-with-loki&#34;&gt;Integration with Loki&lt;/h2&gt;
&lt;p&gt;Graphite queries get converted to Loki queries when the data source selection changes in Explore. Loki label names and values are extracted from the Graphite queries according to mappings information provided in Graphite data source configuration. Queries using tags with &lt;code&gt;seriesByTags()&lt;/code&gt; are also transformed without any additional setup.&lt;/p&gt;
&lt;p&gt;Refer to the Graphite data source settings for more details.&lt;/p&gt;
]]></content><description>&lt;h1 id="graphite-query-editor">Graphite query editor&lt;/h1>
&lt;p>Grafana includes a Graphite-specific query editor to help you build queries.
The query editor helps you quickly navigate the metric space, add functions, and change function parameters.
It can handle all types of Graphite queries, including complex nested queries through the use of query references.&lt;/p></description></item><item><title>Graphite template variables</title><link>https://grafana.com/docs/grafana/v9.5/datasources/graphite/template-variables/</link><pubDate>Thu, 12 Mar 2026 05:44:27 +0000</pubDate><guid>https://grafana.com/docs/grafana/v9.5/datasources/graphite/template-variables/</guid><content><![CDATA[&lt;h1 id=&#34;graphite-template-variables&#34;&gt;Graphite template variables&lt;/h1&gt;
&lt;p&gt;Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables.
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
Grafana refers to such variables as template variables.&lt;/p&gt;
&lt;p&gt;For an introduction to templating and template variables, refer to the &lt;a href=&#34;../../../dashboards/variables/&#34;&gt;Templating&lt;/a&gt; and &lt;a href=&#34;../../../dashboards/variables/add-template-variables/&#34;&gt;Add and manage variables&lt;/a&gt; documentation.&lt;/p&gt;
&lt;h2 id=&#34;select-a-query-type&#34;&gt;Select a query type&lt;/h2&gt;
&lt;p&gt;There are three query types for Graphite template variables&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Query Type&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Default Query&lt;/td&gt;
              &lt;td&gt;Use functions such as &lt;code&gt;tags()&lt;/code&gt;, &lt;code&gt;tag_values()&lt;/code&gt;, &lt;code&gt;expand(&amp;lt;metric&amp;gt;)&lt;/code&gt; and metrics.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Value Query&lt;/td&gt;
              &lt;td&gt;Returns all the values for a query that includes a metric and function.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Metric Name Query&lt;/td&gt;
              &lt;td&gt;Returns all the names for a query that includes a metric and function.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;use-tag-variables&#34;&gt;Use tag variables&lt;/h2&gt;
&lt;p&gt;To create a variable using tag values, use the Grafana functions &lt;code&gt;tags&lt;/code&gt; and &lt;code&gt;tag_values&lt;/code&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Query&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tags()&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Returns all tags.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tags(server=~backend\*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Returns only tags that occur in series matching the filter expression.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tag_values(server)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Returns tag values for the specified tag.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;tag_values(server, server=~backend\*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Returns filtered tag values that occur for the specified tag in series matching those expressions.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Multiple filter expressions and expressions can contain other variables. For example:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;tag_values(server, server=~backend\*, app=~${apps:regex})&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For details, refer to the &lt;a href=&#34;http://graphite.readthedocs.io/en/latest/tags.html#auto-complete-support&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Graphite docs on the autocomplete API for tags&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;use-multi-value-variables-in-tag-queries&#34;&gt;Use multi-value variables in tag queries&lt;/h3&gt;
&lt;p&gt;Multi-value variables in tag queries use the advanced formatting syntax for variables introduced in Grafana v5.0: &lt;code&gt;{var:regex}&lt;/code&gt;.
Non-tag queries use the default glob formatting for multi-value variables.&lt;/p&gt;
&lt;h4 id=&#34;tag-expression-example&#34;&gt;Tag expression example&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Using regex formatting and the Equal Tilde operator, &lt;code&gt;=~&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;text&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-text&#34;&gt;server=~${servers:regex}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more information, refer to &lt;a href=&#34;../../../dashboards/variables/variable-syntax/#advanced-variable-format-options&#34;&gt;Advanced variable format options&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;use-other-query-variables&#34;&gt;Use other query variables&lt;/h2&gt;
&lt;p&gt;When writing queries, use the metric find type of query.&lt;/p&gt;
&lt;p&gt;For example, a query like &lt;code&gt;prod.servers.*&lt;/code&gt; fills the variable with all possible values that exist in the wildcard position.&lt;/p&gt;
&lt;p&gt;The results contain all possible values occurring only at the last level of the query.
To get full metric names matching the query, use the &lt;code&gt;expand&lt;/code&gt; function: &lt;code&gt;expand(*.servers.*)&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;compare-expanded-and-non-expanded-metric-search-results&#34;&gt;Compare expanded and non-expanded metric search results&lt;/h3&gt;
&lt;p&gt;The expanded query returns the full names of matching metrics.
In combination with regular expressions, you can use it to extract any part of the metric name.
By contrast, a non-expanded query returns only the last part of the metric name, and doesn&amp;rsquo;t let you extract other parts of metric names.&lt;/p&gt;
&lt;p&gt;Given these example metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;prod.servers.001.cpu&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prod.servers.002.cpu&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;test.servers.001.cpu&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These examples demonstrate how expanded and non-expanded queries can fetch specific parts of the metrics name:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Non-expanded query&lt;/th&gt;
              &lt;th&gt;Results&lt;/th&gt;
              &lt;th&gt;Expanded query&lt;/th&gt;
              &lt;th&gt;Expanded results&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;*&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;prod, test&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;prod, test&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;*.servers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;servers&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(*.servers)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;prod.servers, test.servers&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;test.servers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;servers&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(test.servers)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;test.servers&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;*.servers.*&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;001,002&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(*.servers.*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;prod.servers.001, prod.servers.002, test.servers.001&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;test.servers.*&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;001&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(test.servers.*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;test.servers.001&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;*.servers.*.cpu&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;cpu&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(*.servers.*.cpu)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;prod.servers.001.cpu, prod.servers.002.cpu, test.servers.001.cpu&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The non-expanded query is the same as an expanded query, with a regex matching the last part of the name.&lt;/p&gt;
&lt;p&gt;You can also create nested variables that use other variables in their definition.
For example, &lt;code&gt;apps.$app.servers.*&lt;/code&gt; uses the variable &lt;code&gt;$app&lt;/code&gt; in its query definition.&lt;/p&gt;
&lt;h3 id=&#34;use-__searchfilter-to-filter-query-variable-results&#34;&gt;Use &lt;code&gt;__searchFilter&lt;/code&gt; to filter query variable results&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Available in Grafana v6.5 and higher.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You can use &lt;code&gt;__searchFilter&lt;/code&gt; in the query field to filter the query result based on what the user types in the dropdown select box.
The default value for &lt;code&gt;__searchFilter&lt;/code&gt; is &lt;code&gt;*&lt;/code&gt; if you&amp;rsquo;ve not entered anything, and `` when used as part of a regular expression.&lt;/p&gt;
&lt;h4 id=&#34;search-filter-example&#34;&gt;Search filter example&lt;/h4&gt;
&lt;p&gt;To use &lt;code&gt;__searchFilter&lt;/code&gt; as part of the query field to enable searching for &lt;code&gt;server&lt;/code&gt; while the user types in the dropdown select box:&lt;/p&gt;
&lt;p&gt;Query&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;apps.$app.servers.$__searchFilter&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;TagValues&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;tag_values(server, server=~${__searchFilter:regex})&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;choose-a-variable-syntax&#34;&gt;Choose a variable syntax&lt;/h2&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/static/img/docs/v2/templated_variable_parameter.png&#34;
  alt=&#34;variable&#34; width=&#34;901&#34;
     height=&#34;69&#34;/&gt;&lt;/p&gt;
&lt;p&gt;The Graphite data source supports two variable syntaxes for use in the &lt;strong&gt;Query&lt;/strong&gt; field:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;$&amp;lt;varname&amp;gt;&lt;/code&gt;, for example &lt;code&gt;apps.frontend.$server.requests.count&lt;/code&gt;, which is easier to read and write but does not allow you to use a variable in the middle of a word.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;${varname}&lt;/code&gt;, for example &lt;code&gt;apps.frontend.${server}.requests.count&lt;/code&gt;, to use in expressions like &lt;code&gt;my.server${serverNumber}.count&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;templated-dashboard-example&#34;&gt;Templated dashboard example&lt;/h3&gt;
&lt;p&gt;To view an example templated dashboard, refer to &lt;a href=&#34;https://play.grafana.org/dashboard/db/graphite-templated-nested&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Graphite Templated Dashboard&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="graphite-template-variables">Graphite template variables&lt;/h1>
&lt;p>Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables.
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
Grafana refers to such variables as template variables.&lt;/p></description></item></channel></rss>