<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/v13.1/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/v13.1/datasources/graphite/index.xml" rel="self" type="application/rss+xml"/><item><title>Configure the Graphite data source</title><link>https://grafana.com/docs/grafana/v13.1/datasources/graphite/configure/</link><pubDate>Tue, 29 Sep 2026 22:18:37 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.1/datasources/graphite/configure/</guid><content><![CDATA[&lt;h1 id=&#34;configure-the-graphite-data-source&#34;&gt;Configure the Graphite data source&lt;/h1&gt;
&lt;p&gt;This document provides instructions for configuring the Graphite data source and explains available configuration options. For general information on managing data sources, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/administration/data-source-management/&#34;&gt;Data source management&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You must have the &lt;code&gt;Organization administrator&lt;/code&gt; role to configure the Graphite data source.
Organization administrators can also &lt;a href=&#34;#provision-the-data-source&#34;&gt;configure the data source via YAML&lt;/a&gt; with the Grafana provisioning system.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Grafana comes with a built-in Graphite data source plugin, eliminating the need to install a plugin.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Familiarize yourself with your Graphite security configuration and gather any necessary security certificates and client keys.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;add-the-graphite-data-source&#34;&gt;Add the Graphite data source&lt;/h2&gt;
&lt;p&gt;To configure basic settings for the data source, complete the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Connections&lt;/strong&gt; in the left-side menu.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add new connection&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;Graphite&lt;/code&gt; in the search bar.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Graphite data source&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add new data source&lt;/strong&gt; in the upper right.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Grafana takes you to the &lt;strong&gt;Settings&lt;/strong&gt; tab, where you set up your Graphite configuration.&lt;/p&gt;
&lt;h2 id=&#34;configuration-options-in-the-ui&#34;&gt;Configuration options in the UI&lt;/h2&gt;
&lt;p&gt;Following is a list of configuration options for Graphite.&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;Setting&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;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;The display name for the data source. This is how you reference it in panels and queries. For example, &lt;code&gt;graphite-1&lt;/code&gt; or &lt;code&gt;graphite-metrics&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Default&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;When enabled, sets this data source as the default for dashboard panels. Grafana automatically selects it when you create new panels.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;strong&gt;HTTP:&lt;/strong&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;Setting&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;strong&gt;URL&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Sets the HTTP protocol, IP, and port of your &lt;code&gt;graphite-web&lt;/code&gt; or &lt;code&gt;graphite-api&lt;/code&gt; installation. Because the access method is set to &lt;em&gt;Server&lt;/em&gt;, the URL must be accessible from the Grafana backend.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Allowed cookies&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;By default, Grafana removes forwarded cookies. Specify cookie names here to allow them to be forwarded to the data source.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Timeout&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Sets the HTTP request timeout in seconds.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;strong&gt;Auth:&lt;/strong&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;&lt;strong&gt;Setting&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Basic Auth&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Toggle on to enable basic authentication to the data source.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;  &lt;strong&gt;User&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Sets the username used for basic authentication.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;  &lt;strong&gt;Password&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Enter the password used for basic authentication.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;With Credentials&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Toggle on to include cookies and authentication headers in cross-origin requests.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;TLS Client Auth&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Toggle on to enable TLS client authentication (both server and client are verified).&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;  &lt;strong&gt;ServerName&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;The server name used to verify the hostname on the certificate returned by the server.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;  &lt;strong&gt;Client Cert&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Client certificate generated by a Certificate Authority (CA) or self-signed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;  &lt;strong&gt;Client Key&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Private key used to encrypt communication between the client and server. Also generated by a CA or self-signed.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;With CA Cert&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Toggle on to authenticate with a CA certificate.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;  &lt;strong&gt;CA Cert&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;CA certificate used to validate the server certificate.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Skip TLS Verify&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Toggle on to bypass TLS certificate validation. Not recommended unless necessary or for testing purposes.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Forward OAuth Identity&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Toggle on to forward the user&amp;rsquo;s upstream OAuth identity to the data source. Grafana includes the access token in the request.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;strong&gt;Custom HTTP Headers:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Pass along additional information and metadata about the request or response.&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;&lt;strong&gt;Setting&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Header&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Add a custom header. This allows custom headers to be passed based on the needs of your Graphite instance.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;The value of the header.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;strong&gt;Graphite details:&lt;/strong&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;&lt;strong&gt;Setting&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Select your Graphite version from the drop-down. This controls which functions are available in the Graphite query editor. Use &lt;code&gt;1.1.x&lt;/code&gt; for Grafana Cloud Graphite.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Graphite backend type&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Select the Graphite backend type. Choosing &lt;code&gt;Metrictank&lt;/code&gt; enables additional features like query processing metadata. (&lt;code&gt;Metrictank&lt;/code&gt; is a multi-tenant time series engine compatible with Graphite.) Use &lt;code&gt;Default&lt;/code&gt; for Grafana Cloud Graphite.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Rollup indicator&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Toggle on to display an info icon in panel headers when data aggregation occurs. Only available when &lt;code&gt;Metrictank&lt;/code&gt; is selected.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;&lt;strong&gt;Label mappings:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Label mappings are the rules you define to tell Grafana how to pull pieces of the Graphite metric path into Loki labels when switching data sources. They are currently only supported between Graphite and Loki queries.&lt;/p&gt;
&lt;p&gt;When you change your data source from Graphite to Loki, your queries are automatically mapped based on the rules you define. To create a mapping, specify the full path of the metric and replace the nodes you want to map with label names, using parentheses. The corresponding label values are extracted from your Graphite query during the data source switch.&lt;/p&gt;
&lt;p&gt;Grafana automatically maps all Graphite tags to labels, even if you haven&amp;rsquo;t defined explicit mappings. When using matching patterns with &lt;code&gt;{}&lt;/code&gt; (for example, &lt;code&gt;metric.{a,b}.value&lt;/code&gt;), Grafana converts them to the Loki regular expression matching syntax. If your queries include functions, Graphite extracts the relevant metrics and tags, then matches them against your mappings.&lt;/p&gt;
&lt;p&gt;For example, given the mapping &lt;code&gt;servers.(cluster).(server).*&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;&lt;strong&gt;Graphite Query&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Mapped to Loki Query&lt;/strong&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;alias(servers.west.001.cpu,1,2)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{cluster=&amp;quot;west&amp;quot;, server=&amp;quot;001&amp;quot;}&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;alias(servers.*.{001,002}.*,1,2)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{server=~&amp;quot;(001|002)&amp;quot;}&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;interpolate(seriesByTag(&#39;foo=bar&#39;, &#39;server=002&#39;), inf)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;{foo=&amp;quot;bar&amp;quot;, server=&amp;quot;002&amp;quot;}&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;&lt;strong&gt;Setting&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Private data source connect&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;em&gt;Only for Grafana Cloud users.&lt;/em&gt; Establishes a private, secured connection between a Grafana Cloud stack and data sources within a private network. Use the drop-down to locate the PDC URL. For setup instructions, refer to &lt;a href=&#34;/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/&#34;&gt;Private data source connect (PDC)&lt;/a&gt; and &lt;a href=&#34;/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#configure-grafana-private-data-source-connect-pdc&#34;&gt;Configure PDC&lt;/a&gt;. Click &lt;strong&gt;Manage private data source connect&lt;/strong&gt; to open your PDC connection page and view your configuration details.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;After configuring your Graphite data source options, click &lt;strong&gt;Save &amp;amp; test&lt;/strong&gt; at the bottom to test the connection. You should see a confirmation dialog box that says:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data source is working&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;provision-the-data-source&#34;&gt;Provision the data source&lt;/h2&gt;
&lt;p&gt;You can define and configure the data source in YAML files as part of the Grafana provisioning system.
For more information about provisioning, and for lists of common configuration options and JSON data options, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/administration/provisioning/#data-sources&#34;&gt;Provisioning data sources&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;yaml-example&#34;&gt;YAML example&lt;/h3&gt;
&lt;p&gt;The following example provisions a Graphite data source:&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;YAML&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-yaml&#34;&gt;apiVersion: 1

datasources:
  - name: Graphite
    type: graphite
    access: proxy
    url: http://localhost:8080
    jsonData:
      graphiteVersion: &amp;#39;1.1&amp;#39;
      graphiteType: default&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following &lt;code&gt;jsonData&lt;/code&gt; options are supported:&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;Option&lt;/th&gt;
              &lt;th&gt;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;&lt;code&gt;graphiteVersion&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;The Graphite version. Supported values are &lt;code&gt;0.9&lt;/code&gt;, &lt;code&gt;1.0&lt;/code&gt;, and &lt;code&gt;1.1&lt;/code&gt;. Defaults to &lt;code&gt;1.1&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;graphiteType&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;string&lt;/td&gt;
              &lt;td&gt;The Graphite backend type. Supported values are &lt;code&gt;default&lt;/code&gt; and &lt;code&gt;metrictank&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;rollupIndicatorEnabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;boolean&lt;/td&gt;
              &lt;td&gt;Displays an info icon in panel headers when data is aggregated. Applies only to &lt;code&gt;metrictank&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;provision-with-terraform&#34;&gt;Provision with Terraform&lt;/h2&gt;
&lt;p&gt;You can provision the Graphite data source using &lt;a href=&#34;https://www.terraform.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Terraform&lt;/a&gt; with the &lt;a href=&#34;https://registry.terraform.io/providers/grafana/grafana/latest/docs&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana Terraform provider&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For more information about provisioning resources with Terraform, refer to the &lt;a href=&#34;/docs/grafana-cloud/developer-resources/infrastructure-as-code/terraform/&#34;&gt;Grafana as code using Terraform&lt;/a&gt; documentation.&lt;/p&gt;
&lt;h3 id=&#34;terraform-example&#34;&gt;Terraform example&lt;/h3&gt;
&lt;p&gt;The following example provisions a Graphite data source:&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;hcl&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-hcl&#34;&gt;terraform {
  required_providers {
    grafana = {
      source  = &amp;#34;grafana/grafana&amp;#34;
      version = &amp;#34;&amp;gt;= 2.0.0&amp;#34;
    }
  }
}

provider &amp;#34;grafana&amp;#34; {
  url  = &amp;#34;&amp;lt;YOUR_GRAFANA_URL&amp;gt;&amp;#34;
  auth = &amp;#34;&amp;lt;YOUR_SERVICE_ACCOUNT_TOKEN&amp;gt;&amp;#34;
}

resource &amp;#34;grafana_data_source&amp;#34; &amp;#34;graphite&amp;#34; {
  type = &amp;#34;graphite&amp;#34;
  name = &amp;#34;Graphite&amp;#34;
  url  = &amp;#34;http://localhost:8080&amp;#34;

  json_data_encoded = jsonencode({
    # Graphite version: 0.9, 1.0, or 1.1
    graphiteVersion = &amp;#34;1.1&amp;#34;
    # Backend type: default or metrictank
    graphiteType = &amp;#34;default&amp;#34;
  })
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;terraform-example-with-basic-authentication&#34;&gt;Terraform example with basic authentication&lt;/h3&gt;
&lt;p&gt;The following example provisions a Graphite data source with basic authentication:&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;hcl&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-hcl&#34;&gt;resource &amp;#34;grafana_data_source&amp;#34; &amp;#34;graphite_auth&amp;#34; {
  type                = &amp;#34;graphite&amp;#34;
  name                = &amp;#34;Graphite&amp;#34;
  url                 = &amp;#34;http://localhost:8080&amp;#34;
  basic_auth_enabled  = true
  basic_auth_username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;

  json_data_encoded = jsonencode({
    graphiteVersion = &amp;#34;1.1&amp;#34;
    graphiteType    = &amp;#34;default&amp;#34;
  })

  secure_json_data_encoded = jsonencode({
    basicAuthPassword = &amp;#34;&amp;lt;PASSWORD&amp;gt;&amp;#34;
  })
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the following placeholders:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;YOUR_GRAFANA_URL&amp;gt;&lt;/code&gt;&lt;/em&gt;: Your Grafana instance URL (for example, &lt;code&gt;https://your-org.grafana.net&lt;/code&gt; for Grafana Cloud)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;YOUR_SERVICE_ACCOUNT_TOKEN&amp;gt;&lt;/code&gt;&lt;/em&gt;: A service account token with data source permissions&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;USERNAME&amp;gt;&lt;/code&gt;&lt;/em&gt;: The username for basic authentication&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;code&gt;&amp;lt;PASSWORD&amp;gt;&lt;/code&gt;&lt;/em&gt;: The password for basic authentication&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="configure-the-graphite-data-source">Configure the Graphite data source&lt;/h1>
&lt;p>This document provides instructions for configuring the Graphite data source and explains available configuration options. For general information on managing data sources, refer to
&lt;a href="/docs/grafana/v13.1/administration/data-source-management/">Data source management&lt;/a>.&lt;/p></description></item><item><title>Graphite query editor</title><link>https://grafana.com/docs/grafana/v13.1/datasources/graphite/query-editor/</link><pubDate>Tue, 29 Sep 2026 22:18:37 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.1/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 supports a variety 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, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/panels-visualizations/query-transform-data/&#34;&gt;Query and transform data&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;query-editor-elements&#34;&gt;Query editor elements&lt;/h2&gt;
&lt;p&gt;The query editor consists of the following elements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Series&lt;/strong&gt;: A series in Graphite is a unique time-series dataset, represented by a specific metric name and timestamped values. Click &lt;strong&gt;select metric&lt;/strong&gt; to choose a metric from the drop-down.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Functions&lt;/strong&gt;: Graphite uses functions to manipulate data. Click the &lt;strong&gt;&#43; sign&lt;/strong&gt; to view a list of functions in the drop-down. You can add multiple functions to a query.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To view the raw query, click the &lt;strong&gt;Pencil icon&lt;/strong&gt; in the upper right. Click the &lt;strong&gt;Pencil icon&lt;/strong&gt; again to continue adding series and functions.&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 browse the available metrics. You can navigate using your mouse or arrow keys. You can also select a wildcard.&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 &lt;strong&gt;&#43; sign&lt;/strong&gt; next to &lt;strong&gt;Function&lt;/strong&gt; to add a function from the drop-down. You can also search by typing the first few letters of the function name.&lt;/p&gt;
&lt;p&gt;After selecting a function, Grafana adds it to your query and automatically places your cursor in the first parameter field.&lt;/p&gt;
&lt;p&gt;To edit a parameter, click it to open an editable text box.&lt;/p&gt;
&lt;p&gt;To remove a function, click it, then click the &lt;strong&gt;X icon&lt;/strong&gt; that appears above it.&lt;/p&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 &lt;code&gt;aliasByNode&lt;/code&gt; support an optional second argument. To add this argument, hover your mouse over the argument and a dialog box opens. To remove the second optional parameter, click it to delete it.&lt;/p&gt;
&lt;p&gt;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;Functions&lt;/a&gt; in the Graphite documentation for more information.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-warning&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Warning&lt;/p&gt;&lt;p&gt;Some functions accept a second argument, which can itself be another function that returns a series. If you need to add a second argument that is a function, Grafana recommends using a series reference from a second query instead of embedding the function directly.&lt;/p&gt;
&lt;p&gt;Currently, the query editor does not support parsing a second function argument when switching between the query builder and the code editor.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;sort-labels&#34;&gt;Sort labels&lt;/h3&gt;
&lt;p&gt;If the same labels appear on multiple graphs, they may be sorted differently and assigned different colors.&lt;/p&gt;
&lt;p&gt;To ensure consistent sorting and coloring, use the &lt;code&gt;sortByName()&lt;/code&gt; function to order labels alphabetically.&lt;/p&gt;
&lt;h3 id=&#34;modify-metric-names-in-tables-or-charts&#34;&gt;Modify metric names in 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;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Grafana calculates legend summary values like &lt;code&gt;max&lt;/code&gt;, &lt;code&gt;min&lt;/code&gt;, and &lt;code&gt;total&lt;/code&gt; on the client side, after data has been calculated.
Depending on the consolidation function used, only one or two of these values may be accurate at the same time.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&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-explore-data-with-tags&#34;&gt;Select and explore data with tags&lt;/h3&gt;
&lt;p&gt;Graphite supports tagged series, so you can filter data by tag key-value pairs instead of only by metric path.&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 the time series.&lt;/p&gt;
&lt;p&gt;The Grafana query builder does this for you automatically when you select a tag.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Regular expression searches 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;/div&gt;

&lt;h2 id=&#34;nested-queries&#34;&gt;Nested queries&lt;/h2&gt;
&lt;p&gt;Grafana lets you reference one query from another using its query letter, similar to how cell references work in a spreadsheet.&lt;/p&gt;
&lt;p&gt;For example, if you add a second query and want to build on the results of query A, you can reference it using &lt;code&gt;#A&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This approach lets you build compound or nested queries so your panels are more flexible and easier to manage.&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 display multiple time series on the same graph, use wildcards in your query to return all matching series at once.&lt;/p&gt;
&lt;p&gt;For example, to monitor CPU utilization across a variety of metrics, you can use a single query like &lt;code&gt;cpu.percent.*.g&lt;/code&gt; to retrieve all matching time series.
This approach is more efficient than writing separate queries for each series, such as &lt;code&gt;cpu.percent.user.g&lt;/code&gt;, &lt;code&gt;cpu.percent.system.g&lt;/code&gt;, and others, which would result in multiple queries to the data source.&lt;/p&gt;
&lt;h2 id=&#34;example-queries&#34;&gt;Example queries&lt;/h2&gt;
&lt;p&gt;The following examples show common query patterns. Each one combines a metric path with one or more Graphite functions.&lt;/p&gt;
&lt;h3 id=&#34;rename-series-for-readable-legends&#34;&gt;Rename series for readable legends&lt;/h3&gt;
&lt;p&gt;Wildcard queries return series whose names are full metric paths. Use &lt;code&gt;aliasByNode()&lt;/code&gt; to display a specific path segment instead. The following query labels each series with the second path node, for example the host name:&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;aliasByNode(servers.*.cpu.percent.user, 1)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;aggregate-across-many-series&#34;&gt;Aggregate across many series&lt;/h3&gt;
&lt;p&gt;Combine matching series into a single line with an aggregation function. The following query sums request counts across all hosts:&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;sumSeries(servers.*.requests.count)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Use &lt;code&gt;averageSeries()&lt;/code&gt;, &lt;code&gt;maxSeries()&lt;/code&gt;, or &lt;code&gt;minSeries()&lt;/code&gt; when you want the average, maximum, or minimum instead of the sum.&lt;/p&gt;
&lt;h3 id=&#34;convert-a-counter-to-a-per-second-rate&#34;&gt;Convert a counter to a per-second rate&lt;/h3&gt;
&lt;p&gt;For ever-increasing counters, use &lt;code&gt;perSecond()&lt;/code&gt; to plot the rate of change:&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;perSecond(servers.web01.nginx.requests.count)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;summarize-into-time-buckets&#34;&gt;Summarize into time buckets&lt;/h3&gt;
&lt;p&gt;Use &lt;code&gt;summarize()&lt;/code&gt; to roll data into fixed intervals, which is useful for bar charts and reducing noise. The following query totals errors in five-minute buckets:&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;summarize(sumSeries(servers.*.errors.count), &amp;#39;5min&amp;#39;, &amp;#39;sum&amp;#39;, false)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;control-consolidation&#34;&gt;Control consolidation&lt;/h3&gt;
&lt;p&gt;When a panel shows a long time range, Grafana consolidates points. Use &lt;code&gt;consolidateBy()&lt;/code&gt; to choose how points combine so peaks aren&amp;rsquo;t averaged away:&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;consolidateBy(servers.web01.response.max, &amp;#39;max&amp;#39;)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;show-the-top-series&#34;&gt;Show the top series&lt;/h3&gt;
&lt;p&gt;Use a filter function to reduce a large wildcard result to the most significant series. The following query keeps the five hosts with the highest peak CPU:&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;highestMax(servers.*.cpu.percent.user, 5)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;select-series-by-tag&#34;&gt;Select series by tag&lt;/h3&gt;
&lt;p&gt;Use &lt;code&gt;seriesByTag()&lt;/code&gt; to select data by tag expressions instead of a metric path:&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;seriesByTag(&amp;#39;name=requests.count&amp;#39;, &amp;#39;env=production&amp;#39;)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;build-on-another-query&#34;&gt;Build on another query&lt;/h3&gt;
&lt;p&gt;Reference a query by its letter to reuse its result. If query A returns per-host request counts, query B can sum them:&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;sumSeries(#A)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;apply-annotations&#34;&gt;Apply annotations&lt;/h2&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/grafana/v13.1/dashboards/build-dashboards/annotate-visualizations/&#34;&gt;Annotations&lt;/a&gt; overlay rich event information on top of graphs. Graphite supports two ways to query annotations: a regular metric query and a Graphite events query.&lt;/p&gt;
&lt;p&gt;For details on both modes, example queries, and how to create events in Graphite, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/annotations/&#34;&gt;Graphite annotations&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;integration-with-loki&#34;&gt;Integration with Loki&lt;/h2&gt;
&lt;p&gt;When you change the data source to Loki in Explore, your Graphite queries are automatically converted to Loki queries. Loki label names and values are extracted based on the mapping information defined in your Graphite data source configuration. Grafana automatically transforms queries that use tags with &lt;code&gt;seriesByTag()&lt;/code&gt; without requiring additional setup.&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 supports a variety 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/v13.1/datasources/graphite/template-variables/</link><pubDate>Tue, 29 Sep 2026 22:18:37 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.1/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 drop-down selection 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;/docs/grafana/v13.1/dashboards/variables/&#34;&gt;Templating&lt;/a&gt; and 
    &lt;a href=&#34;/docs/grafana/v13.1/dashboards/variables/add-template-variables/&#34;&gt;Add and manage variables&lt;/a&gt; documentation.&lt;/p&gt;
&lt;p&gt;To view an example templated dashboard, refer to &lt;a href=&#34;https://play.grafana.org/d/cvDFGseGz/graphite-templated-nested&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Graphite Templated Nested dashboard&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;use-query-variables&#34;&gt;Use query variables&lt;/h2&gt;
&lt;p&gt;Graphite populates &lt;strong&gt;Query&lt;/strong&gt; variables. You can still use other variable types, such as &lt;strong&gt;Custom&lt;/strong&gt;, &lt;strong&gt;Interval&lt;/strong&gt;, and &lt;strong&gt;Text box&lt;/strong&gt;, on a dashboard that queries Graphite. Those types don&amp;rsquo;t send a query to Graphite.&lt;/p&gt;
&lt;p&gt;To create a Graphite query variable, choose the query type from the &lt;strong&gt;Select query type&lt;/strong&gt; drop-down and enter your query in the &lt;strong&gt;Query&lt;/strong&gt; field. Grafana supports three query types for Graphite 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;th&gt;Example&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Default Query&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Runs a metric-find query and returns metric nodes, or tag keys and values when you use &lt;code&gt;tags()&lt;/code&gt; or &lt;code&gt;tag_values()&lt;/code&gt;.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;tag_values(apps.*.requests.count, app)&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Value Query&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Runs the query through the render endpoint and returns the numeric values of the resulting series.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;groupByNode(apps.*.requests.count, 1, &#39;sum&#39;)&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Metric Name Query&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Runs the query through the render endpoint and returns the series names of the result.&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;highestAverage(apps.*.requests.count, 5)&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;choose-a-variable-syntax&#34;&gt;Choose a variable syntax&lt;/h3&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;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 syntax example&#34; width=&#34;901&#34;
     height=&#34;69&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Grafana allows two ways to reference variables in a query:&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;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$varname&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;apps.frontend.$server.requests.count&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;${varname}&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;apps.frontend.${server}.requests.count&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Shorthand syntax (&lt;code&gt;$varname&lt;/code&gt;)&lt;/strong&gt; is convenient for standalone path segments but doesn&amp;rsquo;t work when the variable is adjacent to other characters (for example, &lt;code&gt;cpu$coreLoad&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Full syntax (&lt;code&gt;${varname}&lt;/code&gt;)&lt;/strong&gt; is more flexible and works in any part of the string, including embedded within words.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Choose the format that best fits the structure of your Graphite metric path.&lt;/p&gt;
&lt;h2 id=&#34;use-tag-variables&#34;&gt;Use tag variables&lt;/h2&gt;
&lt;p&gt;Grafana supports tag-based variables for Graphite, allowing you to dynamically populate drop-downs based on tag keys and values in your metric series. To do this, use the Graphite functions &lt;code&gt;tags()&lt;/code&gt; and &lt;code&gt;tag_values()&lt;/code&gt; in your variable queries.&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 a list of all tag keys in the Graphite database.&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 tag keys only from series that match the provided 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 all values for the specified tag key.&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 tag values for a given key, filtered to only those that appear in matching series.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can use multiple filter expressions, and those expressions can include other Grafana variables. For example:&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;tag_values(server, server=~backend*, app=~${apps:regex})&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This query returns all server tag values from series where the &lt;code&gt;server&lt;/code&gt; tag matches &lt;code&gt;backend*&lt;/code&gt; and the &lt;code&gt;app&lt;/code&gt; tag matches the regular expression-filtered values from another variable, &lt;code&gt;${apps}&lt;/code&gt;.&lt;/p&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;p&gt;&lt;strong&gt;Using regular expression 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;This query tells Grafana to format the selected values in the &lt;code&gt;servers&lt;/code&gt; variable as a regular expression (for example, &lt;code&gt;(server1|server2)&lt;/code&gt; if two servers are selected).&lt;/p&gt;
&lt;p&gt;For more information, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/dashboards/variables/variable-syntax/#advanced-variable-format-options&#34;&gt;Advanced variable format options&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;filter-with-multiple-expressions&#34;&gt;Filter with multiple expressions&lt;/h3&gt;
&lt;p&gt;When using multi-value variables in tag queries, append &lt;code&gt;${var:regex}&lt;/code&gt; to the variable name to apply regular expression formatting.&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;tag_values(server, app=~${apps:regex})&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This query returns only series where the app tag matches the selected values in &lt;code&gt;${apps}&lt;/code&gt;, formatted as a regular expression. &lt;code&gt;=~&lt;/code&gt; is the regular expression operator.&lt;/p&gt;
&lt;p&gt;Non-tag queries use the default &lt;code&gt;glob&lt;/code&gt; formatting for multi-value variables.&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 &lt;strong&gt;Default Query&lt;/strong&gt; type to retrieve dynamic metric values.&lt;/p&gt;
&lt;p&gt;For example, the query &lt;code&gt;prod.servers.*&lt;/code&gt; populates the variable with all values that exist at the wildcard position (&lt;code&gt;*&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Note that the results include only the values found at the last level of the query path.&lt;/p&gt;
&lt;p&gt;To return full metric paths that match your query, use the &lt;code&gt;expand()&lt;/code&gt; function:&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;expand(*.servers.*)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;When querying Graphite metrics in Grafana, you can choose between using an &lt;strong&gt;expanded&lt;/strong&gt; or &lt;strong&gt;non-expanded&lt;/strong&gt; query:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Expanded queries&lt;/strong&gt; (using the &lt;code&gt;expand()&lt;/code&gt; function) return the &lt;strong&gt;full metric paths&lt;/strong&gt; that match your query.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Non-expanded queries&lt;/strong&gt; return only the &lt;strong&gt;last segment&lt;/strong&gt; of each matching metric path, which limits your ability to extract or filter based on deeper parts of the metric name.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Expanded queries are especially useful when working with regular expressions to match or extract specific parts of the metric path.&lt;/p&gt;
&lt;p&gt;Suppose your Graphite database contains the following 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;The following table illustrates the difference between expanded and non-expanded queries:&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;&lt;strong&gt;Non-expanded query&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Results&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Expanded query&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;Expanded results&lt;/strong&gt;&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;&lt;code&gt;prod&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;prod&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt;&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;&lt;code&gt;servers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(*.servers)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;prod.servers&lt;/code&gt;, &lt;code&gt;test.servers&lt;/code&gt;&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;&lt;code&gt;servers&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(test.servers)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;test.servers&lt;/code&gt;&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;&lt;code&gt;001&lt;/code&gt;, &lt;code&gt;002&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(*.servers.*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;prod.servers.001&lt;/code&gt;, &lt;code&gt;prod.servers.002&lt;/code&gt;, &lt;code&gt;test.servers.001&lt;/code&gt;&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;&lt;code&gt;001&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(test.servers.*)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;test.servers.001&lt;/code&gt;&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;&lt;code&gt;cpu&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;expand(*.servers.*.cpu)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;prod.servers.001.cpu&lt;/code&gt;, &lt;code&gt;prod.servers.002.cpu&lt;/code&gt;, &lt;code&gt;test.servers.001.cpu&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;

&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;A non-expanded query works like an expanded query but returns only the final segment of each matched metric.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Grafana also supports &lt;strong&gt;nested variables&lt;/strong&gt;, which allow you to reference other variables in a query.&lt;/p&gt;
&lt;p&gt;For example:&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;apps.$app.servers.*&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This query uses the selected value of the &lt;code&gt;$app&lt;/code&gt; variable to dynamically filter the metric path. The variable &lt;code&gt;$app&lt;/code&gt; contains one or more application names and &lt;code&gt;servers.*&lt;/code&gt; matches all servers for the given application.&lt;/p&gt;
&lt;h3 id=&#34;filter-query-variable-results-with-__searchfilter&#34;&gt;Filter query variable results with &lt;code&gt;__searchFilter&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Grafana provides the variable &lt;code&gt;__searchFilter&lt;/code&gt;, which you can use to dynamically filter query results based on what the user types into the variable drop-down.
When the drop-down is empty or blank, &lt;code&gt;__searchFilter&lt;/code&gt; defaults to &lt;code&gt;*&lt;/code&gt;, which means it returns all possible values. If you type a string, Grafana replaces &lt;code&gt;__searchFilter&lt;/code&gt; with that input.&lt;/p&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 drop-down 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;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;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;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;tag_values(server, server=~${__searchFilter:regex})&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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 drop-down selection 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><item><title>Graphite annotations</title><link>https://grafana.com/docs/grafana/v13.1/datasources/graphite/annotations/</link><pubDate>Tue, 29 Sep 2026 22:18:37 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.1/datasources/graphite/annotations/</guid><content><![CDATA[&lt;h1 id=&#34;graphite-annotations&#34;&gt;Graphite annotations&lt;/h1&gt;
&lt;p&gt;Annotations overlay event data on your dashboard graphs, helping you correlate events with metrics. You can use Graphite as a data source for annotations to display events such as deployments, incidents, or maintenance windows on your visualizations.&lt;/p&gt;
&lt;p&gt;For general information about annotations in Grafana, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/dashboards/build-dashboards/annotate-visualizations/&#34;&gt;Annotate visualizations&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;common-use-cases&#34;&gt;Common use cases&lt;/h2&gt;
&lt;p&gt;Graphite annotations help you explain changes in your metrics by marking when related events happened. Common use cases include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Deployments:&lt;/strong&gt; Mark each release so you can see whether a deployment changed latency, error rate, or throughput.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Incidents and outages:&lt;/strong&gt; Mark when incidents start and resolve to correlate them with metric anomalies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maintenance windows:&lt;/strong&gt; Mark planned maintenance so expected dips aren&amp;rsquo;t mistaken for problems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configuration changes:&lt;/strong&gt; Mark when you change a feature flag or setting to track its effect over time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scaling events:&lt;/strong&gt; Mark when you add or remove capacity to explain shifts in load or performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each use case maps to one of the two query modes described in this page: a metric query when an existing metric already marks the event, or an events query when you record discrete events in Graphite.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Before creating Graphite annotations, ensure you have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A configured Graphite data source in Grafana.&lt;/li&gt;
&lt;li&gt;Metrics or events in Graphite that represent the events you want to annotate.&lt;/li&gt;
&lt;li&gt;Read access to the Graphite instance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;annotation-query-modes&#34;&gt;Annotation query modes&lt;/h2&gt;
&lt;p&gt;Graphite supports two ways to query annotations. You configure both in the annotation query editor:&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;Mode&lt;/th&gt;
              &lt;th&gt;Field&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;strong&gt;Metric query&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;strong&gt;Graphite Query&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Runs a standard Graphite metric query. Each returned data point with a non-zero value becomes an annotation, and the series name becomes the title.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Events query&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;strong&gt;Graphite events tags&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Queries the Graphite events API and filters by one or more event tags. Each matching event becomes an annotation.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Use the metric query mode when a metric is non-zero only at the moments you want to mark. A counter that stays above zero after the first event marks every interval, because Grafana creates an annotation for every non-zero point. Use the events query mode when you record discrete events in Graphite and tag them.&lt;/p&gt;
&lt;h2 id=&#34;create-an-annotation-query&#34;&gt;Create an annotation query&lt;/h2&gt;
&lt;p&gt;To add a Graphite annotation to your dashboard:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to the dashboard you want to update and click &lt;strong&gt;Edit&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Add new element&lt;/strong&gt; icon (blue plus sign).&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Annotation query&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter a name for the annotation query.&lt;/li&gt;
&lt;li&gt;If you don&amp;rsquo;t want to use the annotation query right away, clear the &lt;strong&gt;Enabled&lt;/strong&gt; checkbox.&lt;/li&gt;
&lt;li&gt;Select a color for the annotation event markers.&lt;/li&gt;
&lt;li&gt;Select an option in the &lt;strong&gt;Show annotation controls in&lt;/strong&gt; drop-down list to control where on the dashboard the annotation is displayed.&lt;/li&gt;
&lt;li&gt;Select an option in the &lt;strong&gt;Show in&lt;/strong&gt; drop-down list to control the panels in which the annotation is displayed.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Open query editor&lt;/strong&gt; to open the &lt;strong&gt;Annotation Query&lt;/strong&gt; dialog box.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Graphite&lt;/strong&gt; data source from the &lt;strong&gt;Data source&lt;/strong&gt; drop-down list.&lt;/li&gt;
&lt;li&gt;Configure one of the annotation query modes:
&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;Graphite Query&lt;/strong&gt; field, enter a metric query, for example &lt;code&gt;statsd.application.counters.*.count&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Graphite events tags&lt;/strong&gt; field, enter one or more event tags, for example &lt;code&gt;deploy&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;(Optional) Click &lt;strong&gt;Test annotation query&lt;/strong&gt; to ensure that the query is working properly.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Close&lt;/strong&gt; when you&amp;rsquo;ve completed the query setup.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;(Optional) Enter a description of the changes you&amp;rsquo;ve made.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Exit edit&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Enter a value in either the &lt;strong&gt;Graphite Query&lt;/strong&gt; field or the &lt;strong&gt;Graphite events tags&lt;/strong&gt; field, not both. If you provide a metric query, Grafana uses the metric query mode and ignores the tags.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;metric-query-annotations&#34;&gt;Metric query annotations&lt;/h2&gt;
&lt;p&gt;In metric query mode, Grafana runs the value in the &lt;strong&gt;Graphite Query&lt;/strong&gt; field as a standard Graphite query over the dashboard time range. Grafana converts the results into annotations using these rules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Every data point with a non-zero value creates an annotation. Data points with a value of zero or &lt;code&gt;null&lt;/code&gt; are skipped.&lt;/li&gt;
&lt;li&gt;The annotation timestamp is the timestamp of the data point.&lt;/li&gt;
&lt;li&gt;The annotation title is the series name returned by Graphite.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because every non-zero data point creates an annotation, use a metric that only produces values at the moments you want annotated. Metrics that report continuous values produce an annotation at every step interval and flood your dashboard.&lt;/p&gt;
&lt;h3 id=&#34;example-metric-queries&#34;&gt;Example metric queries&lt;/h3&gt;
&lt;p&gt;The following examples show common ways to turn a metric into annotations.&lt;/p&gt;
&lt;h4 id=&#34;deployment-markers&#34;&gt;Deployment markers&lt;/h4&gt;
&lt;p&gt;Record deployments as Graphite events and query them by tag. Refer to &lt;a href=&#34;#events-query-annotations&#34;&gt;Events query annotations&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you only have a counter, query the increase between points. &lt;code&gt;nonNegativeDerivative()&lt;/code&gt; is zero while the counter is flat and non-zero only when it goes up, so annotations appear at each deploy:&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;nonNegativeDerivative(deploys.myservice.count)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;service-restarts&#34;&gt;Service restarts&lt;/h4&gt;
&lt;p&gt;Use the same pattern for restarts. Query a metric that is non-zero only when a restart happens, or record restarts as events:&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;nonNegativeDerivative(stats.myservice.restart.count)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;error-spikes-above-a-threshold&#34;&gt;Error spikes above a threshold&lt;/h4&gt;
&lt;p&gt;Because Grafana skips zero and &lt;code&gt;null&lt;/code&gt; data points, use &lt;code&gt;removeBelowValue()&lt;/code&gt; to annotate only the moments a metric crosses a threshold. The following query annotates every interval where the error count is 100 or greater:&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;removeBelowValue(stats.myservice.errors.count, 100)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Values below 100 become &lt;code&gt;null&lt;/code&gt; and are skipped, so annotations appear only during error spikes.&lt;/p&gt;
&lt;h4 id=&#34;host-down&#34;&gt;Host down&lt;/h4&gt;
&lt;p&gt;Annotate while a host is down by inverting an up metric so that a down state produces a non-zero value:&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;offset(scale(hosts.web01.up, -1), 1)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This query returns &lt;code&gt;1&lt;/code&gt; when &lt;code&gt;up&lt;/code&gt; is &lt;code&gt;0&lt;/code&gt;. Grafana skips the zero points from when the host is up, and creates an annotation for each interval the host stays down.&lt;/p&gt;
&lt;h2 id=&#34;events-query-annotations&#34;&gt;Events query annotations&lt;/h2&gt;
&lt;p&gt;In events query mode, Grafana queries the Graphite events API and filters events by the tags you provide in the &lt;strong&gt;Graphite events tags&lt;/strong&gt; field. Grafana converts each matching event into an annotation using these rules:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The annotation timestamp is the event&amp;rsquo;s &lt;code&gt;when&lt;/code&gt; value.&lt;/li&gt;
&lt;li&gt;The annotation title is the event&amp;rsquo;s &lt;code&gt;what&lt;/code&gt; value.&lt;/li&gt;
&lt;li&gt;The tags you query with are attached to the annotation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Enter multiple tags separated by a space. Grafana sends those tags to the Graphite events API without &lt;code&gt;set=union&lt;/code&gt;, so an event must include every tag.&lt;/p&gt;
&lt;p&gt;You can filter events in the following ways:&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;Value&lt;/th&gt;
              &lt;th&gt;Result&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Empty&lt;/td&gt;
              &lt;td&gt;Returns all events in the dashboard time range.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;A single tag&lt;/td&gt;
              &lt;td&gt;Returns events that include that tag, for example &lt;code&gt;deploy&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Multiple tags&lt;/td&gt;
              &lt;td&gt;Returns events that include every tag. &lt;code&gt;deploy myservice&lt;/code&gt; matches events tagged with both.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;A wildcard&lt;/td&gt;
              &lt;td&gt;Returns events whose tags match the pattern, for example &lt;code&gt;web*&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;create-events-in-graphite&#34;&gt;Create events in Graphite&lt;/h3&gt;
&lt;p&gt;Before you can query events, record them in Graphite. Graphite exposes an HTTP endpoint for creating events:&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;sh&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-sh&#34;&gt;curl -X POST http://&amp;lt;GRAPHITE_HOST&amp;gt;/events/ \
  -H &amp;#34;Content-Type: application/json&amp;#34; \
  -d &amp;#39;{
    &amp;#34;what&amp;#34;: &amp;#34;Deployed myservice v2.5.0&amp;#34;,
    &amp;#34;tags&amp;#34;: [&amp;#34;deploy&amp;#34;, &amp;#34;myservice&amp;#34;],
    &amp;#34;data&amp;#34;: &amp;#34;Deployed new feature flags and performance improvements&amp;#34;
  }&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace &lt;em&gt;&lt;code&gt;&amp;lt;GRAPHITE_HOST&amp;gt;&lt;/code&gt;&lt;/em&gt; with your Graphite server address. The &lt;code&gt;what&lt;/code&gt; field becomes the annotation title, and the &lt;code&gt;tags&lt;/code&gt; field is what you filter on in the &lt;strong&gt;Graphite events tags&lt;/strong&gt; field.&lt;/p&gt;
&lt;h3 id=&#34;example-events-queries&#34;&gt;Example events queries&lt;/h3&gt;
&lt;p&gt;The following examples show what to enter in the &lt;strong&gt;Graphite events tags&lt;/strong&gt; field for common scenarios.&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;Goal&lt;/th&gt;
              &lt;th&gt;Value&lt;/th&gt;
              &lt;th&gt;Result&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Show all events&lt;/td&gt;
              &lt;td&gt;Empty&lt;/td&gt;
              &lt;td&gt;Displays every event in the dashboard time range.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Show all deployments&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;deploy&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Displays events tagged &lt;code&gt;deploy&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Deployments for one service&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;deploy myservice&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Displays events tagged with both &lt;code&gt;deploy&lt;/code&gt; and &lt;code&gt;myservice&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;All production events&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;prod*&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Displays events whose tags match the &lt;code&gt;prod*&lt;/code&gt; pattern.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Incidents&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;incident&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Displays events tagged &lt;code&gt;incident&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;correlate-multiple-event-types&#34;&gt;Correlate multiple event types&lt;/h3&gt;
&lt;p&gt;To compare different kinds of events on the same dashboard, add more than one annotation query and give each a distinct color. For example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a &lt;strong&gt;Deployments&lt;/strong&gt; annotation query with the tag &lt;code&gt;deploy&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add an &lt;strong&gt;Incidents&lt;/strong&gt; annotation query with the tag &lt;code&gt;incident&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add a &lt;strong&gt;Maintenance&lt;/strong&gt; annotation query with the tag &lt;code&gt;maintenance&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each query renders in its own color, so you can see how deployments, incidents, and maintenance windows line up with your metrics.&lt;/p&gt;
&lt;h2 id=&#34;use-template-variables-in-annotations&#34;&gt;Use template variables in annotations&lt;/h2&gt;
&lt;p&gt;You can use template variables in both annotation query modes to filter annotations based on dashboard variable selections. Grafana resolves the variables at query time using the current dashboard variable values.&lt;/p&gt;
&lt;p&gt;Metric query with a variable:&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;nonNegativeDerivative(deploys.$service.count)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Events query with a variable:&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;deploy $environment&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more information about template variables, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/template-variables/&#34;&gt;Graphite template variables&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;end-to-end-example-correlate-deployments-with-latency&#34;&gt;End-to-end example: correlate deployments with latency&lt;/h2&gt;
&lt;p&gt;This walkthrough shows how to combine a Graphite events annotation query with a metric panel so you can see whether deployments affect request latency. The result is a time series panel that plots latency with a vertical marker at each deployment.&lt;/p&gt;
&lt;h3 id=&#34;before-you-start&#34;&gt;Before you start&lt;/h3&gt;
&lt;p&gt;Ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Graphite data source configured in Grafana.&lt;/li&gt;
&lt;li&gt;A latency metric in Graphite, for example &lt;code&gt;stats.timers.myservice.request.latency.p95&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Permission to create events in Graphite.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;step-1-record-a-deployment-event&#34;&gt;Step 1: Record a deployment event&lt;/h3&gt;
&lt;p&gt;When your pipeline deploys the service, post an event to Graphite tagged &lt;code&gt;deploy&lt;/code&gt; and &lt;code&gt;myservice&lt;/code&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;sh&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-sh&#34;&gt;curl -X POST http://&amp;lt;GRAPHITE_HOST&amp;gt;/events/ \
  -H &amp;#34;Content-Type: application/json&amp;#34; \
  -d &amp;#39;{
    &amp;#34;what&amp;#34;: &amp;#34;Deployed myservice v2.5.0&amp;#34;,
    &amp;#34;tags&amp;#34;: [&amp;#34;deploy&amp;#34;, &amp;#34;myservice&amp;#34;],
    &amp;#34;data&amp;#34;: &amp;#34;Rolled out connection pool changes&amp;#34;
  }&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace &lt;em&gt;&lt;code&gt;&amp;lt;GRAPHITE_HOST&amp;gt;&lt;/code&gt;&lt;/em&gt; with your Graphite server address.&lt;/p&gt;
&lt;h3 id=&#34;step-2-build-the-latency-panel&#34;&gt;Step 2: Build the latency panel&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Create a dashboard and add a &lt;strong&gt;Time series&lt;/strong&gt; panel.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Graphite&lt;/strong&gt; data source.&lt;/li&gt;
&lt;li&gt;In the query editor, build the latency query, for example &lt;code&gt;stats.timers.myservice.request.latency.p95&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Confirm the panel plots your latency data over the selected time range.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;step-3-add-the-deployment-annotation-query&#34;&gt;Step 3: Add the deployment annotation query&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;In the dashboard toolbar, click the &lt;strong&gt;Add new element&lt;/strong&gt; icon (blue plus sign), then click &lt;strong&gt;Annotation query&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter &lt;code&gt;Deployments&lt;/code&gt; as the name and select a color that stands out against the latency line.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Open query editor&lt;/strong&gt; and select the &lt;strong&gt;Graphite&lt;/strong&gt; data source.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Graphite events tags&lt;/strong&gt; field, enter &lt;code&gt;deploy myservice&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;(Optional) Click &lt;strong&gt;Test annotation query&lt;/strong&gt; to confirm the query returns events.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Close&lt;/strong&gt;, then &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;step-4-interpret-the-result&#34;&gt;Step 4: Interpret the result&lt;/h3&gt;
&lt;p&gt;The panel now shows a vertical marker at each deployment. Hover over a marker to see the deployment title from the event&amp;rsquo;s &lt;code&gt;what&lt;/code&gt; value. If latency rises immediately after a marker, the deployment is a likely cause. If latency is steady across markers, deployments aren&amp;rsquo;t degrading performance.&lt;/p&gt;
&lt;p&gt;To extend the dashboard, add a second annotation query tagged &lt;code&gt;incident&lt;/code&gt; in a different color, so you can tell whether latency changes follow deployments or unrelated incidents.&lt;/p&gt;
&lt;h2 id=&#34;troubleshoot-annotation-issues&#34;&gt;Troubleshoot annotation issues&lt;/h2&gt;
&lt;p&gt;The following section addresses common issues you might encounter when using Graphite annotations.&lt;/p&gt;
&lt;h3 id=&#34;annotations-dont-appear&#34;&gt;Annotations don&amp;rsquo;t appear&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Possible causes and solutions:&lt;/strong&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;Cause&lt;/th&gt;
              &lt;th&gt;Solution&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Time range doesn&amp;rsquo;t include the events&lt;/td&gt;
              &lt;td&gt;Expand the dashboard time range to include the event timestamps.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Metric query returns only zero values&lt;/td&gt;
              &lt;td&gt;Annotations are created only for non-zero data points. Verify the metric produces non-zero values at event times.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;No matching events&lt;/td&gt;
              &lt;td&gt;Confirm events exist in Graphite for the supplied tags and time range.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Both fields are populated&lt;/td&gt;
              &lt;td&gt;Clear one of the fields. Grafana uses the metric query mode whenever the &lt;strong&gt;Graphite Query&lt;/strong&gt; field has a value.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;annotation-title-is-empty&#34;&gt;Annotation title is empty&lt;/h3&gt;
&lt;p&gt;In events query mode, Grafana uses the event&amp;rsquo;s &lt;code&gt;what&lt;/code&gt; value as the title. Ensure the &lt;code&gt;what&lt;/code&gt; field is populated when you create events in Graphite.&lt;/p&gt;
&lt;p&gt;For more troubleshooting guidance, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/troubleshooting/&#34;&gt;Troubleshoot Graphite data source issues&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="graphite-annotations">Graphite annotations&lt;/h1>
&lt;p>Annotations overlay event data on your dashboard graphs, helping you correlate events with metrics. You can use Graphite as a data source for annotations to display events such as deployments, incidents, or maintenance windows on your visualizations.&lt;/p></description></item><item><title>Graphite alerting</title><link>https://grafana.com/docs/grafana/v13.1/datasources/graphite/alerting/</link><pubDate>Tue, 29 Sep 2026 22:18:37 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.1/datasources/graphite/alerting/</guid><content><![CDATA[&lt;h1 id=&#34;graphite-alerting&#34;&gt;Graphite alerting&lt;/h1&gt;
&lt;p&gt;You can use Grafana Alerting with Graphite to create alerts based on your time series data. This lets you monitor metrics, detect anomalies, and receive notifications when specific conditions are met.&lt;/p&gt;
&lt;p&gt;For general information about Grafana Alerting, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/alerting/&#34;&gt;Grafana Alerting&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;Before creating alerts with Graphite, ensure you have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A Graphite data source configured in Grafana. Refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/configure/&#34;&gt;Configure the Graphite data source&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Permission to create alert rules.&lt;/li&gt;
&lt;li&gt;An understanding of the metrics you want to monitor.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;supported-queries&#34;&gt;Supported queries&lt;/h2&gt;
&lt;p&gt;Grafana Alerting evaluates any Graphite query that returns time series data. Grafana runs the query on the backend, reduces each series to a single value, and compares that value against the condition you define.&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 pattern&lt;/th&gt;
              &lt;th&gt;Alerting support&lt;/th&gt;
              &lt;th&gt;Notes&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Single metric path&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;The most predictable option for alerting.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Aggregated series&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Use &lt;code&gt;sumSeries()&lt;/code&gt;, &lt;code&gt;averageSeries()&lt;/code&gt;, or similar to combine matching series.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Wildcard metric path&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Returns one series per match. Reduce or aggregate before the condition.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Tag query with &lt;code&gt;seriesByTag()&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Requires Graphite 1.1 or later.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;create-an-alert-rule&#34;&gt;Create an alert rule&lt;/h2&gt;
&lt;p&gt;To create an alert rule using Graphite:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Alerting&lt;/strong&gt; &amp;gt; &lt;strong&gt;Alert rules&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;New alert rule&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter a name for the alert rule.&lt;/li&gt;
&lt;li&gt;In the query section, select your &lt;strong&gt;Graphite&lt;/strong&gt; data source.&lt;/li&gt;
&lt;li&gt;Build your query:
&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Select metric&lt;/strong&gt; to choose the metric path, or click the pencil icon to write the query in code.&lt;/li&gt;
&lt;li&gt;Add Graphite functions to aggregate or shape the series, for example &lt;code&gt;sumSeries()&lt;/code&gt; or &lt;code&gt;summarize()&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Add a &lt;strong&gt;Reduce&lt;/strong&gt; expression to convert the series to a single value, for example &lt;code&gt;Last&lt;/code&gt; or &lt;code&gt;Mean&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add a &lt;strong&gt;Threshold&lt;/strong&gt; expression that defines when the alert fires, for example when the value is above a limit.&lt;/li&gt;
&lt;li&gt;Set the evaluation interval and pending period.&lt;/li&gt;
&lt;li&gt;Configure notifications and labels.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save rule&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For detailed instructions, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/alerting/alerting-rules/create-grafana-managed-rule/&#34;&gt;Create a Grafana-managed alert rule&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;example-alert-queries&#34;&gt;Example alert queries&lt;/h2&gt;
&lt;p&gt;The following examples show common alerting scenarios with Graphite. Each query returns a single series that the alert condition reduces to one value.&lt;/p&gt;
&lt;h3 id=&#34;alert-on-high-cpu-usage&#34;&gt;Alert on high CPU usage&lt;/h3&gt;
&lt;p&gt;Average CPU usage across every core on a host and alert when it exceeds 90%:&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;averageSeries(servers.web01.cpu.*.percent.user)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Condition:&lt;/strong&gt; Reduce with &lt;code&gt;Mean&lt;/code&gt;, then alert when the value is above &lt;code&gt;90&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;alert-on-low-free-disk-space&#34;&gt;Alert on low free disk space&lt;/h3&gt;
&lt;p&gt;Monitor available disk space and alert when it drops below 10 GB:&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;servers.web01.disk.root.free_bytes&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Condition:&lt;/strong&gt; Reduce with &lt;code&gt;Last&lt;/code&gt;, then alert when the value is below &lt;code&gt;10737418240&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;alert-on-high-error-rate&#34;&gt;Alert on high error rate&lt;/h3&gt;
&lt;p&gt;Combine error counts across a service and alert on spikes:&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;summarize(sumSeries(stats.myservice.errors.count), &amp;#39;5min&amp;#39;, &amp;#39;sum&amp;#39;, false)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Condition:&lt;/strong&gt; Reduce with &lt;code&gt;Last&lt;/code&gt;, then alert when the value is above &lt;code&gt;100&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;alert-on-request-latency&#34;&gt;Alert on request latency&lt;/h3&gt;
&lt;p&gt;Monitor 95th percentile latency and alert when it exceeds 500 ms:&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;stats.timers.myservice.request.latency.p95&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Condition:&lt;/strong&gt; Reduce with &lt;code&gt;Mean&lt;/code&gt;, then alert when the value is above &lt;code&gt;500&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;alert-across-many-hosts&#34;&gt;Alert across many hosts&lt;/h3&gt;
&lt;p&gt;Use a wildcard to evaluate every matching host and alert when any host crosses the threshold:&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;aliasByNode(servers.*.cpu.percent.user, 1)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Because the wildcard returns one series per host, configure the alert rule to evaluate each series separately so you get a distinct alert instance for each host that breaches the threshold.&lt;/p&gt;
&lt;h2 id=&#34;limitations&#34;&gt;Limitations&lt;/h2&gt;
&lt;p&gt;When using Graphite with Grafana Alerting, be aware of the following limitations.&lt;/p&gt;
&lt;h3 id=&#34;template-variables-not-supported&#34;&gt;Template variables not supported&lt;/h3&gt;
&lt;p&gt;Alert queries can&amp;rsquo;t contain template variables. Grafana evaluates alert rules on the backend without dashboard context, so variables like &lt;code&gt;$server&lt;/code&gt; or &lt;code&gt;$environment&lt;/code&gt; aren&amp;rsquo;t resolved.&lt;/p&gt;
&lt;p&gt;If your dashboard query uses template variables, create a separate query for alerting with hard-coded values.&lt;/p&gt;
&lt;h3 id=&#34;nested-queries-not-supported&#34;&gt;Nested queries not supported&lt;/h3&gt;
&lt;p&gt;Alert queries can&amp;rsquo;t reference another query by letter, such as &lt;code&gt;#A&lt;/code&gt;. Build a self-contained query for each alert rule instead of chaining query references.&lt;/p&gt;
&lt;h3 id=&#34;consolidation-affects-results&#34;&gt;Consolidation affects results&lt;/h3&gt;
&lt;p&gt;Grafana consolidates data points so that a query doesn&amp;rsquo;t return more points than needed. Consolidation can change the value the alert evaluates. Use &lt;code&gt;consolidateBy()&lt;/code&gt; or &lt;code&gt;summarize()&lt;/code&gt; to control how Graphite aggregates points, and match the interval to your evaluation frequency.&lt;/p&gt;
&lt;h3 id=&#34;metrics-that-stop-reporting&#34;&gt;Metrics that stop reporting&lt;/h3&gt;
&lt;p&gt;When a metric stops reporting, the query returns no data rather than a zero value, so a threshold alone can&amp;rsquo;t detect the gap. To alert when a service stops sending metrics, set the alert rule&amp;rsquo;s &lt;strong&gt;No Data&lt;/strong&gt; state to &lt;strong&gt;Alerting&lt;/strong&gt;. Configure this behavior in the alert rule under the evaluation options. For more information, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/alerting/alerting-rules/create-grafana-managed-rule/#configure-no-data-and-error-handling&#34;&gt;Configure no data and error handling&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;best-practices&#34;&gt;Best practices&lt;/h2&gt;
&lt;p&gt;Follow these best practices when creating Graphite alerts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Return a single series:&lt;/strong&gt; Aggregate wildcard queries with &lt;code&gt;sumSeries()&lt;/code&gt; or &lt;code&gt;averageSeries()&lt;/code&gt;, or evaluate each series separately when you want per-target alerts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Control consolidation:&lt;/strong&gt; Use &lt;code&gt;consolidateBy()&lt;/code&gt; or &lt;code&gt;summarize()&lt;/code&gt; so the evaluated value matches what you expect.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test queries first:&lt;/strong&gt; Verify your query returns the expected values in 
    &lt;a href=&#34;/docs/grafana/v13.1/explore/&#34;&gt;Explore&lt;/a&gt; before creating an alert.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Set realistic thresholds:&lt;/strong&gt; Base thresholds on historical data patterns to avoid false positives.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use meaningful names:&lt;/strong&gt; Give alert rules descriptive names that indicate what they monitor.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/query-editor/&#34;&gt;Build queries&lt;/a&gt; to explore your metrics before creating alerts.&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/troubleshooting/&#34;&gt;Troubleshoot Graphite data source issues&lt;/a&gt; if alerts aren&amp;rsquo;t firing as expected.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="graphite-alerting">Graphite alerting&lt;/h1>
&lt;p>You can use Grafana Alerting with Graphite to create alerts based on your time series data. This lets you monitor metrics, detect anomalies, and receive notifications when specific conditions are met.&lt;/p></description></item><item><title>Troubleshoot Graphite data source issues</title><link>https://grafana.com/docs/grafana/v13.1/datasources/graphite/troubleshooting/</link><pubDate>Tue, 29 Sep 2026 22:18:37 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.1/datasources/graphite/troubleshooting/</guid><content><![CDATA[&lt;h1 id=&#34;troubleshoot-graphite-data-source-issues&#34;&gt;Troubleshoot Graphite data source issues&lt;/h1&gt;
&lt;p&gt;This document provides solutions for common issues you might encounter when using the Graphite data source.&lt;/p&gt;
&lt;h2 id=&#34;connection-issues&#34;&gt;Connection issues&lt;/h2&gt;
&lt;p&gt;Use the following troubleshooting steps to resolve connection problems between Grafana and your Graphite server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data source test fails with &amp;ldquo;Unable to connect&amp;rdquo;:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If the data source test fails, verify the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The URL in your data source configuration is correct and accessible from the Grafana server.&lt;/li&gt;
&lt;li&gt;The Graphite server is running and accepting connections.&lt;/li&gt;
&lt;li&gt;Any firewall rules or network policies allow traffic between Grafana and the Graphite server.&lt;/li&gt;
&lt;li&gt;If using TLS, ensure your certificates are valid and properly configured.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To test connectivity, run the following command from the Grafana server:&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;sh&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-sh&#34;&gt;curl -v &amp;lt;GRAPHITE_URL&amp;gt;/render&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace &lt;em&gt;&lt;code&gt;&amp;lt;GRAPHITE_URL&amp;gt;&lt;/code&gt;&lt;/em&gt; with your Graphite server URL. A successful connection returns a response from the Graphite server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Authentication errors:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you receive 401 or 403 errors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify your Basic Auth username and password are correct.&lt;/li&gt;
&lt;li&gt;Ensure the &lt;strong&gt;With Credentials&lt;/strong&gt; toggle is enabled if your Graphite server requires cookies for authentication.&lt;/li&gt;
&lt;li&gt;Check that your TLS client certificates are valid and match what the server expects.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For detailed authentication configuration, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/configure/&#34;&gt;Configure the Graphite data source&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Deprecation notice about browser access mode:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If the data source configuration page shows a deprecation notice about browser access mode:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The data source is configured to use browser (direct) access, which is deprecated and slated for removal.&lt;/li&gt;
&lt;li&gt;Edit the data source so it uses &lt;em&gt;Server&lt;/em&gt; (proxy) access instead. Server access routes requests through the Grafana backend, which avoids browser cross-origin restrictions.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save &amp;amp; test&lt;/strong&gt; to re-test the connection after switching.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;query-issues&#34;&gt;Query issues&lt;/h2&gt;
&lt;p&gt;Use the following troubleshooting steps to resolve problems with Graphite queries.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No data returned:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If your query returns no data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify the metric path exists in your Graphite server by testing directly in the Graphite web interface.&lt;/li&gt;
&lt;li&gt;Check that the time range in Grafana matches when data was collected.&lt;/li&gt;
&lt;li&gt;Ensure wildcards in your query match existing metrics.&lt;/li&gt;
&lt;li&gt;Confirm your query syntax is correct for your Graphite version.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;HTTP 500 errors with HTML content:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Graphite-web versions before 1.6 return HTTP 500 errors with full HTML stack traces when a query fails. If you see error messages containing HTML tags:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check the Graphite server logs for the full error details.&lt;/li&gt;
&lt;li&gt;Verify your query syntax is valid.&lt;/li&gt;
&lt;li&gt;Ensure the requested time range doesn&amp;rsquo;t exceed your Graphite server&amp;rsquo;s capabilities.&lt;/li&gt;
&lt;li&gt;Check that all functions used in your query are supported by your Graphite version.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Parser errors in the query editor:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If the query editor displays parser errors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check for unbalanced parentheses in function calls.&lt;/li&gt;
&lt;li&gt;Verify that function arguments are in the correct format.&lt;/li&gt;
&lt;li&gt;Ensure metric paths don&amp;rsquo;t contain unsupported characters.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Queries don&amp;rsquo;t map correctly when switching from Graphite to Loki:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Label mappings apply only when you switch between Graphite and Loki queries. If mapped queries produce unexpected labels or no results:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify your label mappings are defined in the Graphite data source configuration.&lt;/li&gt;
&lt;li&gt;Remember that Grafana automatically maps all Graphite tags to labels, so you only need explicit mappings for non-tag metric nodes.&lt;/li&gt;
&lt;li&gt;Check that multi-value patterns such as &lt;code&gt;{001,002}&lt;/code&gt; map to the expected regular expression, for example &lt;code&gt;{server=~&amp;quot;(001|002)&amp;quot;}&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, refer to the label mappings section in 
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/configure/&#34;&gt;Configure the Graphite data source&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For query syntax help, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/query-editor/&#34;&gt;Graphite query editor&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;version-and-feature-issues&#34;&gt;Version and feature issues&lt;/h2&gt;
&lt;p&gt;Use the following troubleshooting steps to resolve problems related to Graphite versions and features.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Functions missing from the query editor:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If expected functions don&amp;rsquo;t appear in the query editor:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify the correct Graphite version is selected in the data source configuration.&lt;/li&gt;
&lt;li&gt;The available functions depend on the configured version. For example, tag-based functions require Graphite 1.1 or later.&lt;/li&gt;
&lt;li&gt;If using a custom Graphite installation with additional functions, ensure the version setting matches your server.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Tag-based queries not working:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;seriesByTag()&lt;/code&gt; or other tag functions fail:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Confirm your Graphite server is version 1.1 or later.&lt;/li&gt;
&lt;li&gt;Verify the Graphite version setting in your data source configuration matches your actual server version.&lt;/li&gt;
&lt;li&gt;Check that tags are properly configured in your Graphite server.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;template-variable-issues&#34;&gt;Template variable issues&lt;/h2&gt;
&lt;p&gt;Use the following troubleshooting steps when dashboard variables don&amp;rsquo;t behave as expected.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Variable not interpolated in a query:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When a variable is adjacent to other characters, use the full syntax &lt;code&gt;${varname}&lt;/code&gt; instead of &lt;code&gt;$varname&lt;/code&gt;. For example, use &lt;code&gt;cpu.${core}.load&lt;/code&gt; rather than &lt;code&gt;cpu.$coreLoad&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Confirm the variable name matches exactly, including case.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Multi-value variable returns no data in tag queries:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tag queries expect regular expression formatting for multi-value variables. Append &lt;code&gt;:regex&lt;/code&gt; to the variable, for example &lt;code&gt;tag_values(server, app=~${apps:regex})&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Non-tag queries use the default glob formatting and don&amp;rsquo;t require &lt;code&gt;:regex&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Dependent variable is empty:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Define the parent variable above the child variable in the dashboard variable list so it resolves first.&lt;/li&gt;
&lt;li&gt;Verify the parent variable has a selected value. An empty parent produces an empty child query.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, refer to 
    &lt;a href=&#34;/docs/grafana/v13.1/datasources/graphite/template-variables/&#34;&gt;Graphite template variables&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;performance-issues&#34;&gt;Performance issues&lt;/h2&gt;
&lt;p&gt;Use the following troubleshooting steps to address slow queries or timeouts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Queries timing out:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If queries consistently time out:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Increase the &lt;strong&gt;Timeout&lt;/strong&gt; setting in the data source configuration.&lt;/li&gt;
&lt;li&gt;Reduce the time range of your query.&lt;/li&gt;
&lt;li&gt;Use more specific metric paths instead of broad wildcards.&lt;/li&gt;
&lt;li&gt;Consider using &lt;code&gt;summarize()&lt;/code&gt; or &lt;code&gt;consolidateBy()&lt;/code&gt; functions to reduce the amount of data returned.&lt;/li&gt;
&lt;li&gt;Check your Graphite server&amp;rsquo;s performance and resource utilization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Slow autocomplete in the query editor:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If metric path autocomplete is slow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This often indicates a large number of metrics in your Graphite server.&lt;/li&gt;
&lt;li&gt;Use more specific path prefixes to narrow the search scope.&lt;/li&gt;
&lt;li&gt;Check your Graphite server&amp;rsquo;s index performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;metrictank-backend-issues&#34;&gt;MetricTank backend issues&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re using MetricTank as your Graphite backend, use the following troubleshooting steps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rollup indicator not appearing:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If the &lt;strong&gt;Rollup indicator&lt;/strong&gt; doesn&amp;rsquo;t display when expected:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify &lt;strong&gt;Metrictank&lt;/strong&gt; is selected as the Graphite backend type in the data source configuration.&lt;/li&gt;
&lt;li&gt;Ensure the &lt;strong&gt;Rollup indicator&lt;/strong&gt; toggle is enabled.&lt;/li&gt;
&lt;li&gt;The indicator only appears when data aggregation actually occurs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Unexpected data aggregation:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you see unexpected aggregation in your data:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check the data aggregation (&lt;code&gt;rollup&lt;/code&gt;) configuration in your MetricTank instance.&lt;/li&gt;
&lt;li&gt;Adjust the time range or use &lt;code&gt;consolidateBy()&lt;/code&gt; to control aggregation behavior.&lt;/li&gt;
&lt;li&gt;Review the query processing metadata in the panel inspector for details on how data was processed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;enable-debug-logging&#34;&gt;Enable debug logging&lt;/h2&gt;
&lt;p&gt;To capture detailed request and response information when troubleshooting Graphite issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Set the Grafana log level to &lt;code&gt;debug&lt;/code&gt; in the configuration file:&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;ini&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-ini&#34;&gt;[log]
level = debug&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart Grafana to apply the change.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reproduce the issue, then review the logs in &lt;code&gt;/var/log/grafana/grafana.log&lt;/code&gt; (or your configured log location) for Graphite-related entries that include the request URL and response details.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reset the log level to &lt;code&gt;info&lt;/code&gt; after troubleshooting to avoid excessive log volume.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;get-additional-help&#34;&gt;Get additional help&lt;/h2&gt;
&lt;p&gt;If you continue to experience issues:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check the &lt;a href=&#34;https://community.grafana.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Grafana community forums&lt;/a&gt; for similar issues and solutions.&lt;/li&gt;
&lt;li&gt;Review the &lt;a href=&#34;https://graphite.readthedocs.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Graphite documentation&lt;/a&gt; for additional configuration options.&lt;/li&gt;
&lt;li&gt;Contact &lt;a href=&#34;/support/&#34;&gt;Grafana Support&lt;/a&gt; if you&amp;rsquo;re an Enterprise, Cloud Pro, or Cloud Advanced customer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When reporting issues, include the following information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grafana version&lt;/li&gt;
&lt;li&gt;Graphite version (for example, 1.1.x) and backend type (Default or MetricTank)&lt;/li&gt;
&lt;li&gt;Authentication method (Basic Auth, TLS, or none)&lt;/li&gt;
&lt;li&gt;Error messages (redact sensitive information)&lt;/li&gt;
&lt;li&gt;Steps to reproduce the issue&lt;/li&gt;
&lt;li&gt;Relevant configuration such as data source settings, timeout values, and Graphite version setting (redact passwords and other credentials)&lt;/li&gt;
&lt;li&gt;Sample query (if applicable, with sensitive data redacted)&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h1 id="troubleshoot-graphite-data-source-issues">Troubleshoot Graphite data source issues&lt;/h1>
&lt;p>This document provides solutions for common issues you might encounter when using the Graphite data source.&lt;/p>
&lt;h2 id="connection-issues">Connection issues&lt;/h2>
&lt;p>Use the following troubleshooting steps to resolve connection problems between Grafana and your Graphite server.&lt;/p></description></item></channel></rss>