<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>InfluxDB data source on Grafana Labs</title><link>https://grafana.com/docs/grafana/v12.4/datasources/influxdb/</link><description>Recent content in InfluxDB data source on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/grafana/v12.4/datasources/influxdb/index.xml" rel="self" type="application/rss+xml"/><item><title>Configure the InfluxDB data source</title><link>https://grafana.com/docs/grafana/v12.4/datasources/influxdb/configure/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/datasources/influxdb/configure/</guid><content><![CDATA[&lt;h1 id=&#34;configure-the-influxdb-data-source&#34;&gt;Configure the InfluxDB data source&lt;/h1&gt;
&lt;p&gt;Learn how to configure the InfluxDB data source and explore the available configuration options.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;p&gt;To configure the InfluxDB data source, you must have the &lt;code&gt;Administrator&lt;/code&gt; role.&lt;/p&gt;
&lt;p&gt;InfluxData provides three query languages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Flux&lt;/strong&gt; - A functional data scripting language for InfluxDB 2.x. Refer to &lt;a href=&#34;https://docs.influxdata.com/influxdb/cloud/query-data/get-started/query-influxdb/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Query InfluxDB with Flux&lt;/a&gt; for a basic guide on working with Flux.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;InfluxQL&lt;/strong&gt; - A SQL-like query language developed by InfluxData. It doesn&amp;rsquo;t support advanced functions such as JOINs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SQL&lt;/strong&gt; - Native SQL language available for InfluxDB v3.x.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To help choose the best language for your needs, refer to
a &lt;a href=&#34;https://docs.influxdata.com/influxdb/v1.8/flux/flux-vs-influxql/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;comparison of Flux vs InfluxQL&lt;/a&gt;
and &lt;a href=&#34;https://www.influxdata.com/blog/why-were-building-flux-a-new-data-scripting-and-query-language/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Why InfluxData created Flux&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re unsure which InfluxDB product you&amp;rsquo;re using, refer to InfluxData&amp;rsquo;s &lt;a href=&#34;https://docs.influxdata.com/influxdb3/enterprise/visualize-data/grafana/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;InfluxDB product detection tool&lt;/a&gt; for guidance.&lt;/p&gt;
&lt;h2 id=&#34;add-the-influxdb-data-source&#34;&gt;Add the InfluxDB data source&lt;/h2&gt;
&lt;p&gt;Complete the following steps to set up a new InfluxDB data source:&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;InfluxDB&lt;/code&gt; in the search bar.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;InfluxDB&lt;/strong&gt; data source.&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 opens the &lt;strong&gt;Settings&lt;/strong&gt; tab where you configure the data source. A sidebar on the left displays navigation links to each configuration section:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;URL and authentication&lt;/li&gt;
&lt;li&gt;Database settings&lt;/li&gt;
&lt;li&gt;Private data source connect (optional, Grafana Cloud only)&lt;/li&gt;
&lt;li&gt;Save &amp;amp; test&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;configuration-options&#34;&gt;Configuration options&lt;/h2&gt;
&lt;p&gt;The following sections describe the available configuration options.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/influxdb/influxdb-updated-ui-v12.3.png&#34;
  alt=&#34;InfluxDB data source configuration page showing the sidebar navigation and settings&#34; width=&#34;1278&#34;
     height=&#34;821&#34;/&gt;&lt;/p&gt;
&lt;p&gt;First, configure the name of your connection.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Name&lt;/strong&gt; - Sets the name you use to refer to the data source in panels and queries. Examples: &lt;code&gt;InfluxDB-InfluxQL&lt;/code&gt;, &lt;code&gt;InfluxDB_SQL&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Default&lt;/strong&gt; - Toggle to set as the default data source.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;url-and-authentication&#34;&gt;URL and authentication&lt;/h3&gt;
&lt;p&gt;Use these settings to specify the InfluxDB instance the data source connects to.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;URL&lt;/strong&gt; - The HTTP protocol, IP address, and port of your InfluxDB API. The InfluxDB default API port is &lt;code&gt;8086&lt;/code&gt;. When you enter a URL, Grafana attempts to auto-detect your InfluxDB product based on URL patterns. Refer to &lt;a href=&#34;https://docs.influxdata.com/influxdb3/enterprise/visualize-data/grafana/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;InfluxDB detection&lt;/a&gt; for more information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Product&lt;/strong&gt; - Select the InfluxDB product you&amp;rsquo;re connecting to. The available query languages depend on your product selection.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Query language&lt;/strong&gt; - Select the query language for your InfluxDB instance. This determines the connection details needed in &lt;strong&gt;Database settings&lt;/strong&gt;. The available options are:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Flux&lt;/strong&gt; - Flux is a data scripting language developed by InfluxData that allows you to query, analyze, and act on data. Refer to &lt;a href=&#34;https://docs.influxdata.com/influxdb/cloud/query-data/get-started/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Get started with Flux&lt;/a&gt; for guidance on using Flux.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;InfluxQL&lt;/strong&gt; - SQL-like language for querying InfluxDB, with statements such as SELECT, FROM, WHERE, and GROUP BY that are familiar to SQL users.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SQL&lt;/strong&gt; - Native SQL language starting with &lt;strong&gt;InfluxDB v3.0&lt;/strong&gt;. Refer to InfluxData&amp;rsquo;s &lt;a href=&#34;https://docs.influxdata.com/influxdb/cloud-serverless/reference/sql/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;SQL reference documentation&lt;/a&gt; for a list of supported statements, operators, and functions.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following table shows which query languages are available for each InfluxDB product:&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;Product&lt;/th&gt;
              &lt;th&gt;Supported query languages&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB Cloud Dedicated&lt;/td&gt;
              &lt;td&gt;SQL, InfluxQL&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB Cloud Serverless&lt;/td&gt;
              &lt;td&gt;SQL, InfluxQL, Flux&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB Clustered&lt;/td&gt;
              &lt;td&gt;SQL, InfluxQL&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB Enterprise 1.x&lt;/td&gt;
              &lt;td&gt;InfluxQL, Flux&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB Enterprise 3.x&lt;/td&gt;
              &lt;td&gt;SQL, InfluxQL&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB Cloud (TSM)&lt;/td&gt;
              &lt;td&gt;InfluxQL, Flux&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB Cloud 1&lt;/td&gt;
              &lt;td&gt;InfluxQL&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB OSS 1.x&lt;/td&gt;
              &lt;td&gt;InfluxQL, Flux&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB OSS 2.x&lt;/td&gt;
              &lt;td&gt;InfluxQL, Flux&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxDB OSS 3.x&lt;/td&gt;
              &lt;td&gt;SQL, InfluxQL&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;&lt;em&gt;For InfluxQL only.&lt;/em&gt; &lt;strong&gt;Database &#43; Retention Policy (DBRP) Mapping&lt;/strong&gt; must be configured before data can be queried for the following products: &lt;em&gt;InfluxDB OSS 1.x&lt;/em&gt;, &lt;em&gt;InfluxDB OSS 2.x&lt;/em&gt;, &lt;em&gt;InfluxDB Enterprise 1.x&lt;/em&gt;, &lt;em&gt;InfluxDB Cloud (TSM)&lt;/em&gt;, &lt;em&gt;InfluxDB Cloud Serverless&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Refer to &lt;a href=&#34;https://docs.influxdata.com/influxdb/cloud/query-data/influxql/dbrp/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Manage DBRP Mappings&lt;/a&gt; for guidance on setting this up using the CLI or API.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h4 id=&#34;advanced-http-settings&#34;&gt;Advanced HTTP settings&lt;/h4&gt;
&lt;p&gt;Toggle &lt;strong&gt;Advanced HTTP Settings&lt;/strong&gt; to expand optional settings for more control over your data source.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Allowed cookies&lt;/strong&gt; - Defines which cookies are forwarded to the data source. All other cookies are deleted by default.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timeout&lt;/strong&gt; - Set an HTTP request timeout in seconds.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Custom HTTP headers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Click &lt;strong&gt;&#43; Add header&lt;/strong&gt; to add one or more HTTP headers. HTTP headers pass additional context and metadata about the request/response.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Header&lt;/strong&gt; - Add a custom HTTP header. Select an option from the drop-down. Allows custom headers to be passed based on the needs of your InfluxDB instance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Value&lt;/strong&gt; - The value for the header.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;auth-and-tlsssl-settings&#34;&gt;Auth and TLS/SSL settings&lt;/h4&gt;
&lt;p&gt;Toggle &lt;strong&gt;Auth and TLS/SSL Settings&lt;/strong&gt; to expand authentication and security options.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No Authentication&lt;/strong&gt; - Make the data source available without authentication. Grafana recommends using some type of authentication method.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Basic auth&lt;/strong&gt; - The most common authentication method. Use your InfluxDB instance username and password to authenticate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Forward OAuth identity&lt;/strong&gt; - Forward the OAuth access token (and also the OIDC ID token if available) of the user querying the data source.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;With credentials&lt;/strong&gt; - Toggle to enable credentials such as cookies or auth headers to be sent with cross-site requests.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;TLS/SSL Certificates are encrypted and stored in the Grafana database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;TLS client auth&lt;/strong&gt; - When enabled, add the &lt;code&gt;Server name&lt;/code&gt;, &lt;code&gt;Client cert&lt;/code&gt; and &lt;code&gt;Client key&lt;/code&gt;. The client provides a certificate that the server validates to establish the client’s trusted identity. The client key encrypts the data between client and server.
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Server name&lt;/strong&gt; - Name of the server. Example: &lt;code&gt;server1.domain.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Client cert&lt;/strong&gt; - Add the client certificate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Client key&lt;/strong&gt; - Add the client key.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CA cert&lt;/strong&gt; - Authenticate with a CA certificate. When enabled, follow the instructions of your CA (Certificate Authority) to download the certificate file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Skip TLS verify&lt;/strong&gt; - Toggle to bypass TLS certificate validation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;database-settings&#34;&gt;Database settings&lt;/h3&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;Setting the database for this data source &lt;strong&gt;does not deny access to other databases&lt;/strong&gt;. The InfluxDB query syntax allows switching the database in the query. For example: &lt;code&gt;SHOW MEASUREMENTS ON _internal&lt;/code&gt; or &lt;code&gt;SELECT * FROM &amp;quot;_internal&amp;quot;..&amp;quot;database&amp;quot; LIMIT 10&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To support data isolation and security, make sure appropriate permissions are configured in InfluxDB.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Use these settings to specify the InfluxDB database your data source connects to. The required fields vary based on the query language selected in &lt;strong&gt;URL and authentication&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The following table shows which fields are required for each query language:&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;Flux&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;InfluxQL&lt;/strong&gt;&lt;/th&gt;
              &lt;th&gt;&lt;strong&gt;SQL&lt;/strong&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Organization&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Default Bucket&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Database&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
              &lt;td&gt;✓&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;&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
              &lt;td&gt;&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;&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Token&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;✓&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&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;Organization&lt;/strong&gt; - Sets the &lt;a href=&#34;https://docs.influxdata.com/influxdb/v2/admin/organizations/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;InfluxDB organization&lt;/a&gt; used for Flux queries. Also used for the &lt;code&gt;v.organization&lt;/code&gt; query macro.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Default Bucket&lt;/strong&gt; - The &lt;a href=&#34;https://docs.influxdata.com/influxdb/v2/admin/buckets/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;InfluxDB bucket&lt;/a&gt; used for the &lt;code&gt;v.defaultBucket&lt;/code&gt; macro in Flux queries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Database&lt;/strong&gt; - Sets the database name to query. Refer to &lt;a href=&#34;https://docs.influxdata.com/influxdb/v2/admin/buckets/view-buckets/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;View buckets&lt;/a&gt; in InfluxData&amp;rsquo;s documentation on how to locate the list of available buckets and their corresponding IDs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User&lt;/strong&gt; - The username used to sign in to InfluxDB.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Password&lt;/strong&gt; - The password for the specified user. Used with InfluxQL queries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Token&lt;/strong&gt; - The authentication token used to query InfluxDB. Retrieve this from the &lt;a href=&#34;https://docs.influxdata.com/influxdb/v2/admin/tokens/view-tokens/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Tokens page&lt;/a&gt; in the InfluxDB UI.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For Flux&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;With InfluxDB 2.x products, use the &lt;a href=&#34;https://docs.influxdata.com/influxdb/v2/admin/tokens/create-token/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;InfluxDB authentication token&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;For InfluxDB 1.8, the token is &lt;code&gt;username:password&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;advanced-database-settings&#34;&gt;Advanced database settings&lt;/h4&gt;
&lt;p&gt;Toggle &lt;strong&gt;Advanced Database Settings&lt;/strong&gt; to expand optional settings that give you more control over the query experience.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Max series&lt;/strong&gt; - Sets a limit on the maximum number of series or tables that Grafana processes. Set a lower limit to prevent system overload, or increase it if you have many small time series and need to display more of them. The default is &lt;code&gt;1000&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For Flux and InfluxQL&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Min time interval&lt;/strong&gt; - Sets the minimum time interval for auto group-by. Grafana recommends setting this to match the data write frequency. For example, if your data is written every minute, it&amp;rsquo;s recommended to set this interval to 1 minute, so that each group contains data from each new write. The default is &lt;code&gt;10s&lt;/code&gt;. Refer to &lt;a href=&#34;#min-time-interval&#34;&gt;Min time interval&lt;/a&gt; for format examples.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For InfluxQL&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;HTTP method&lt;/strong&gt; - Sets the HTTP method used to query your data source. The POST method allows for larger queries that would return an error using the GET method. The default method is &lt;code&gt;POST&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autocomplete range&lt;/strong&gt; - Sets a time range limit for the query editor&amp;rsquo;s autocomplete to reduce the execution time of tag filter queries. As a result, any tags not present within the defined time range will be filtered out. For example, setting the value to 12h will include only tag keys/values from the past 12 hours. This feature is recommended for use with very large databases, where significant performance improvements can be observed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For SQL&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Insecure Connection&lt;/strong&gt; - Toggle to disable gRPC TLS security.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;private-data-source-connect&#34;&gt;Private data source connect&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;For Grafana Cloud only.&lt;/em&gt; Private data source connect (PDC) allows you to establish a private, secured connection between a Grafana Cloud instance and data sources secured within a private network. For more information, 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;.&lt;/p&gt;
&lt;p&gt;Click &lt;strong&gt;Manage private data source connect&lt;/strong&gt; to go to your PDC connection page, where you&amp;rsquo;ll find your PDC configuration details.&lt;/p&gt;
&lt;h3 id=&#34;save-and-test&#34;&gt;Save and test&lt;/h3&gt;
&lt;p&gt;After you have configured your connection settings, click &lt;strong&gt;Save &amp;amp; test&lt;/strong&gt; to validate the data source connection.&lt;/p&gt;
&lt;p&gt;A successful test returns one of the following messages depending on your query language:&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 language&lt;/th&gt;
              &lt;th&gt;Success message&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Flux&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;datasource is working. X buckets found&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;InfluxQL&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;datasource is working. X measurements found&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;SQL&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;OK&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If the test fails, refer to &lt;a href=&#34;../troubleshooting/&#34;&gt;Troubleshoot InfluxDB data source issues&lt;/a&gt; for help resolving common connection and authentication errors.&lt;/p&gt;
&lt;h3 id=&#34;min-time-interval&#34;&gt;Min time interval&lt;/h3&gt;
&lt;p&gt;The &lt;strong&gt;Min time interval&lt;/strong&gt; setting defines a lower limit for the auto group-by time interval.&lt;/p&gt;
&lt;p&gt;This value &lt;strong&gt;must be&lt;/strong&gt; formatted as a number followed by a valid time identifier:&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;Identifier&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;y&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;year&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;M&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;month&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;w&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;week&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;d&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;day&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;h&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;hour&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;m&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;minute&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;s&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;second&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;ms&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;millisecond&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can also override this setting in a dashboard panel under its data source options.&lt;/p&gt;
&lt;h2 id=&#34;provision-the-influxdb-data-source&#34;&gt;Provision the InfluxDB 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 available configuration options, refer
to 
    &lt;a href=&#34;/docs/grafana/v12.4/administration/provisioning/#provision-grafana&#34;&gt;Provision Grafana&lt;/a&gt;.&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;The &lt;code&gt;database&lt;/code&gt; &lt;a href=&#34;https://github.com/grafana/grafana/pull/58647&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;field is deprecated&lt;/a&gt;.
Grafana recommends using the &lt;code&gt;dbName&lt;/code&gt; field in &lt;code&gt;jsonData&lt;/code&gt;. There is no need to change existing provisioning settings.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h3 id=&#34;provisioning-examples&#34;&gt;Provisioning examples&lt;/h3&gt;
&lt;p&gt;Provisioning differs based on query language.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;InfluxDB 1.x example:&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;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: InfluxDB_v1
    type: influxdb
    access: proxy
    user: grafana
    url: http://localhost:8086
    jsonData:
      dbName: site
      httpMode: GET
    secureJsonData:
      password: grafana&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;InfluxDB 2.x for Flux example:&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;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: InfluxDB_v2_Flux
    type: influxdb
    access: proxy
    url: http://localhost:8086
    jsonData:
      version: Flux
      organization: organization
      defaultBucket: bucket
      tlsSkipVerify: true
    secureJsonData:
      token: token&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;InfluxDB 2.x for InfluxQL example:&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;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: InfluxDB_v2_InfluxQL
    type: influxdb
    access: proxy
    url: http://localhost:8086
    jsonData:
      dbName: site
      httpHeaderName1: &amp;#39;Authorization&amp;#39;
    secureJsonData:
      httpHeaderValue1: &amp;#39;Token &amp;lt;token&amp;gt;&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;InfluxDB 3.x for SQL example:&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;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: InfluxDB_v3_SQL
    type: influxdb
    access: proxy
    url: http://localhost:8086
    jsonData:
      version: SQL
      dbName: site
      httpMode: POST
      insecureGrpc: false
    secureJsonData:
      token: &amp;#39;&amp;lt;api-token&amp;gt;&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;configure-the-data-source-with-terraform&#34;&gt;Configure the data source with Terraform&lt;/h2&gt;
&lt;p&gt;You can configure the InfluxDB data source using 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;h3 id=&#34;terraform-prerequisites&#34;&gt;Terraform prerequisites&lt;/h3&gt;
&lt;p&gt;Before you begin, you need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.terraform.io/downloads&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Terraform&lt;/a&gt; installed&lt;/li&gt;
&lt;li&gt;Grafana Terraform provider configured with appropriate credentials&lt;/li&gt;
&lt;li&gt;For Grafana Cloud: A &lt;a href=&#34;/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/&#34;&gt;Cloud Access Policy token&lt;/a&gt; with data source permissions&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;provider-configuration&#34;&gt;Provider configuration&lt;/h3&gt;
&lt;p&gt;Configure the Grafana provider to connect to your Grafana instance:&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;
    }
  }
}

# For Grafana Cloud
provider &amp;#34;grafana&amp;#34; {
  url  = &amp;#34;&amp;lt;YOUR_GRAFANA_CLOUD_STACK_URL&amp;gt;&amp;#34;
  auth = &amp;#34;&amp;lt;YOUR_SERVICE_ACCOUNT_TOKEN&amp;gt;&amp;#34;
}

# For self-hosted Grafana
# provider &amp;#34;grafana&amp;#34; {
#   url  = &amp;#34;http://localhost:3000&amp;#34;
#   auth = &amp;#34;&amp;lt;API_KEY_OR_SERVICE_ACCOUNT_TOKEN&amp;gt;&amp;#34;
# }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;terraform-examples&#34;&gt;Terraform examples&lt;/h3&gt;
&lt;p&gt;The following examples show how to configure the InfluxDB data source for each query language.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;InfluxDB 2.x with Flux:&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;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;influxdb_flux&amp;#34; {
  type = &amp;#34;influxdb&amp;#34;
  name = &amp;#34;InfluxDB_Flux&amp;#34;
  url  = &amp;#34;http://localhost:8086&amp;#34;

  json_data_encoded = jsonencode({
    version       = &amp;#34;Flux&amp;#34;
    organization  = &amp;#34;&amp;lt;ORGANIZATION&amp;gt;&amp;#34;
    defaultBucket = &amp;#34;&amp;lt;DEFAULT_BUCKET&amp;gt;&amp;#34;
    tlsSkipVerify = false
  })

  secure_json_data_encoded = jsonencode({
    token = &amp;#34;&amp;lt;API_TOKEN&amp;gt;&amp;#34;
  })
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;InfluxDB 1.x with InfluxQL:&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;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;influxdb_influxql&amp;#34; {
  type = &amp;#34;influxdb&amp;#34;
  name = &amp;#34;InfluxDB_InfluxQL&amp;#34;
  url  = &amp;#34;http://localhost:8086&amp;#34;

  basic_auth_enabled  = true
  basic_auth_username = &amp;#34;&amp;lt;USERNAME&amp;gt;&amp;#34;

  json_data_encoded = jsonencode({
    dbName   = &amp;#34;&amp;lt;DATABASE&amp;gt;&amp;#34;
    httpMode = &amp;#34;POST&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;&lt;strong&gt;InfluxDB 2.x with InfluxQL (token auth):&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;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;influxdb_v2_influxql&amp;#34; {
  type = &amp;#34;influxdb&amp;#34;
  name = &amp;#34;InfluxDB_v2_InfluxQL&amp;#34;
  url  = &amp;#34;http://localhost:8086&amp;#34;

  json_data_encoded = jsonencode({
    dbName          = &amp;#34;&amp;lt;DATABASE&amp;gt;&amp;#34;
    httpHeaderName1 = &amp;#34;Authorization&amp;#34;
  })

  secure_json_data_encoded = jsonencode({
    httpHeaderValue1 = &amp;#34;Token &amp;lt;API_TOKEN&amp;gt;&amp;#34;
  })
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;InfluxDB 3.x with SQL:&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;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;influxdb_sql&amp;#34; {
  type = &amp;#34;influxdb&amp;#34;
  name = &amp;#34;InfluxDB_SQL&amp;#34;
  url  = &amp;#34;http://localhost:8086&amp;#34;

  json_data_encoded = jsonencode({
    version      = &amp;#34;SQL&amp;#34;
    dbName       = &amp;#34;&amp;lt;DATABASE&amp;gt;&amp;#34;
    httpMode     = &amp;#34;POST&amp;#34;
    insecureGrpc = false
  })

  secure_json_data_encoded = jsonencode({
    token = &amp;#34;&amp;lt;API_TOKEN&amp;gt;&amp;#34;
  })
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more information about the Grafana Terraform provider, refer to the &lt;a href=&#34;https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Terraform provider documentation&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-the-influxdb-data-source">Configure the InfluxDB data source&lt;/h1>
&lt;p>Learn how to configure the InfluxDB data source and explore the available configuration options.&lt;/p>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;p>To configure the InfluxDB data source, you must have the &lt;code>Administrator&lt;/code> role.&lt;/p></description></item><item><title>InfluxDB query Editor</title><link>https://grafana.com/docs/grafana/v12.4/datasources/influxdb/query-editor/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/datasources/influxdb/query-editor/</guid><content><![CDATA[&lt;h1 id=&#34;influxdb-query-editor&#34;&gt;InfluxDB query editor&lt;/h1&gt;
&lt;p&gt;Grafana&amp;rsquo;s query editors are unique to each data source. For general information on Grafana query editors, refer to 
    &lt;a href=&#34;/docs/grafana/v12.4/panels-visualizations/query-transform-data/#query-editors&#34;&gt;Query editors&lt;/a&gt;. For general information on querying data sources in Grafana, refer to 
    &lt;a href=&#34;/docs/grafana/v12.4/panels-visualizations/query-transform-data/&#34;&gt;Query and transform data&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The InfluxDB query editor is located on the 
    &lt;a href=&#34;/docs/grafana/v12.4/explore/&#34;&gt;Explore page&lt;/a&gt;. You can also access the InfluxDB query editor from a dashboard panel. Click the ellipsis in the upper right of the panel and select &lt;strong&gt;Edit&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;You can also use the query editor to retrieve &lt;a href=&#34;#query-logs&#34;&gt;log data&lt;/a&gt; and &lt;a href=&#34;#apply-annotations&#34;&gt;annotate&lt;/a&gt; visualizations.&lt;/p&gt;
&lt;h2 id=&#34;choose-a-query-editing-mode&#34;&gt;Choose a query editing mode&lt;/h2&gt;
&lt;p&gt;The InfluxDB data source has three different types of query editors, each corresponding to the query language selected in the 
    &lt;a href=&#34;/docs/grafana/v12.4/datasources/influxdb/configure-influxdb-data-source/#influxdb-configuration-options&#34;&gt;data source configuration&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#influxql-query-editor&#34;&gt;InfluxQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#sql-query-editor&#34;&gt;SQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#flux-query-editor&#34;&gt;Flux&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Editor options vary based on query language.&lt;/p&gt;
&lt;h2 id=&#34;influxql-query-editor&#34;&gt;InfluxQL query editor&lt;/h2&gt;
&lt;p&gt;The InfluxQL query editor helps you select metrics and tags to create InfluxQL queries. There are two modes: &lt;code&gt;visual editor mode&lt;/code&gt; and &lt;code&gt;raw query mode&lt;/code&gt;. To switch between the two modes click the &lt;strong&gt;pencil icon&lt;/strong&gt; in the upper right.&lt;/p&gt;
&lt;p&gt;Visual query editor mode contains the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;FROM&lt;/strong&gt; - Select a measurement to query.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WHERE&lt;/strong&gt; - Select filters by clicking the &lt;strong&gt;&#43; sign&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SELECT&lt;/strong&gt; - Select fields and functions from the drop-down. You can add multiple fields and functions by clicking the &lt;strong&gt;&#43; sign&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GROUP BY&lt;/strong&gt; - Select a tag from the drop-down menu.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TIMEZONE&lt;/strong&gt; - &lt;em&gt;Optional&lt;/em&gt; Group data by a specific timezone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ORDER BY TIME&lt;/strong&gt; - Sort data by time in either ascending or descending order.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LIMIT&lt;/strong&gt; - &lt;em&gt;Optional&lt;/em&gt; Limits the number of rows returned by the query.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SLIMIT&lt;/strong&gt; - &lt;em&gt;Optional&lt;/em&gt; Limits the number of series returned by the query. Refer to &lt;a href=&#34;https://docs.influxdata.com/influxdb/cloud/query-data/influxql/explore-data/limit-and-slimit/#slimit-clause&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;SLIMIT clause&lt;/a&gt; for more information on this option.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FORMAT AS&lt;/strong&gt; - Select a format option from the drop-down menu.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ALIAS&lt;/strong&gt; - Add an alias. Refer to &lt;a href=&#34;#alias-patterns&#34;&gt;Alias patterns&lt;/a&gt; for more information.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;raw-query-editor-mode&#34;&gt;Raw query editor mode&lt;/h3&gt;
&lt;p&gt;You can write raw InfluxQL queries by switching to raw query mode. Click the pencil in the upper right of the query editor to switch modes. Note that when you switch to visual editor mode, you will lose any changes made in raw query mode.&lt;/p&gt;
&lt;p&gt;If you use raw query mode, your query must include &lt;code&gt;WHERE $timeFilter&lt;/code&gt;. You should also provide a group by time and an aggregation function. Otherwise, InfluxDB may return hundreds of thousands of data points, potentially causing your browser to hang.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/static/img/docs/influxdb/influxql-query-editor-8-0.png&#34;
  alt=&#34;InfluxQL query editor&#34; width=&#34;633&#34;
     height=&#34;267&#34;/&gt;&lt;/p&gt;
&lt;h3 id=&#34;match-by-regular-expressions&#34;&gt;Match by regular expressions&lt;/h3&gt;
&lt;p&gt;You can enter regular expressions for metric names or tag filter values.
Wrap the regex pattern in forward slashes (&lt;code&gt;/&lt;/code&gt;), as shown in this example: &lt;code&gt;/measurement/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Grafana automatically adjusts the filter tag condition to use the InfluxDB regex match condition operator (&lt;code&gt;=~&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id=&#34;field-and-aggregation-functions&#34;&gt;Field and aggregation functions&lt;/h3&gt;
&lt;p&gt;In the &lt;code&gt;SELECT&lt;/code&gt; row, you can specify which fields and functions to use.&lt;/p&gt;
&lt;p&gt;If you &lt;strong&gt;group by time&lt;/strong&gt; you must use an aggregation function. Certain functions such as &lt;code&gt;derivative&lt;/code&gt; also require an aggregation function.&lt;/p&gt;
&lt;p&gt;If you have the following:&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload&#34;
  data-src=&#34;/static/img/docs/influxdb/select_editor.png&#34;
  alt=&#34;&#34; width=&#34;657&#34;
     height=&#34;46&#34;/&gt;&lt;/p&gt;
&lt;p&gt;The query editor input generates an InfluxDB &lt;code&gt;SELECT&lt;/code&gt; clause:&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;SQL&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-sql&#34;&gt;SELECT derivative(mean(&amp;#34;value&amp;#34;), 10s) / 10 AS &amp;#34;REQ/s&amp;#34;
FROM....&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can also use a * in a SELECT statement to select all fields.&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;SQL&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-sql&#34;&gt;SELECT * FROM &amp;lt;measurement_name&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;group-by-results&#34;&gt;GROUP BY results&lt;/h3&gt;
&lt;p&gt;To group results by a tag, specify the tag in the &lt;strong&gt;GROUP BY&lt;/strong&gt; row:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click the &lt;strong&gt;&#43; sign&lt;/strong&gt; in the GROUP BY row.&lt;/li&gt;
&lt;li&gt;Select a tag from the drop-down.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can GROUP BY multiple options.&lt;/p&gt;
&lt;p&gt;To remove a GROUP BY option click the &lt;strong&gt;X icon&lt;/strong&gt; next to the option.&lt;/p&gt;
&lt;h3 id=&#34;alias-patterns&#34;&gt;Alias patterns&lt;/h3&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;Alias pattern&lt;/th&gt;
              &lt;th&gt;Replaced with&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$m&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Measurement name.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$measurement&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Measurement name.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$1&lt;/code&gt; - &lt;code&gt;$9&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Part of measurement name (if you separate your measurement name with dots).&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$col&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Column name.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$tag_exampletag&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The value of the &lt;code&gt;exampletag&lt;/code&gt; tag. The syntax is &lt;code&gt;$tag*yourTagName&lt;/code&gt; and must start with &lt;code&gt;$tag*&lt;/code&gt;. To use your tag as an alias in the ALIAS BY field, you must use the tag to group by in the query.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;You can also use the &lt;code&gt;[[tag_hostname]]&lt;/code&gt; pattern replacement syntax.&lt;/p&gt;
&lt;p&gt;For example, entering the value &lt;code&gt;Host: [[tag_hostname]]&lt;/code&gt; in the ALIAS BY field replaces it with the &lt;code&gt;hostname&lt;/code&gt; tag value for each legend value.&lt;/p&gt;
&lt;p&gt;An example legend value is &lt;code&gt;Host: server1&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;sql-query-editor&#34;&gt;SQL query editor&lt;/h2&gt;
&lt;p&gt;Grafana supports the &lt;a href=&#34;https://docs.influxdata.com/influxdb/cloud-serverless/query-data/sql/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;SQL query language&lt;/a&gt; in &lt;a href=&#34;https://www.influxdata.com/blog/introducing-influxdb-3-0/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;InfluxDB v3.0&lt;/a&gt; and higher.&lt;/p&gt;
&lt;p&gt;You construct your SQL query directly in the query editor.&lt;/p&gt;
&lt;h3 id=&#34;macros&#34;&gt;Macros&lt;/h3&gt;
&lt;p&gt;You can use macros in your query to automatically substitute them with values from Grafana&amp;rsquo;s context.&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;Macro example&lt;/th&gt;
              &lt;th&gt;Replaced with&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$__timeFrom&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The start of the currently active time selection, such as &lt;code&gt;2020-06-11T13:31:00Z&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$__timeTo&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The end of the currently active time selection, such as &lt;code&gt;2020-06-11T14:31:00Z&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$__timeFilter&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The time range that applies the start and the end of currently active time selection.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$__interval&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An interval string that corresponds to Grafana&amp;rsquo;s calculated interval based on the time range of the active time selection, such as &lt;code&gt;5s&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$__dateBin(&amp;lt;column&amp;gt;)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Applies &lt;a href=&#34;https://docs.influxdata.com/influxdb/cloud-serverless/reference/sql/functions/time-and-date/#date_bin&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;date_bin&lt;/a&gt; function. Column must be timestamp.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;$__dateBinAlias(&amp;lt;column&amp;gt;)&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Applies &lt;a href=&#34;https://docs.influxdata.com/influxdb/cloud-serverless/reference/sql/functions/time-and-date/#date_bin&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;date_bin&lt;/a&gt; function with suffix &lt;code&gt;_binned&lt;/code&gt;. Column must be timestamp.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Examples:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;// with macro
1. SELECT * FROM cpu WHERE time &amp;gt;= $__timeFrom AND time &amp;lt;= $__timeTo
2. SELECT * FROM cpu WHERE $__timeFilter(time)
3. SELECT $__dateBin(time) from cpu

// interpolated
1. SELECT * FROM iox.cpu WHERE time &amp;gt;= cast(&amp;#39;2023-12-15T12:38:30Z&amp;#39; as timestamp) AND time &amp;lt;= cast(&amp;#39;2023-12-15T18:38:30Z&amp;#39; as timestamp)
2. SELECT * FROM cpu WHERE time &amp;gt;= &amp;#39;2023-12-15T12:41:28Z&amp;#39; AND time &amp;lt;= &amp;#39;2023-12-15T18:41:28Z&amp;#39;
3. SELECT date_bin(interval &amp;#39;15 second&amp;#39;, time, timestamp &amp;#39;1970-01-01T00:00:00Z&amp;#39;) from cpu&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;flux-query-editor&#34;&gt;Flux query editor&lt;/h2&gt;
&lt;p&gt;Grafana supports Flux when running InfluxDB v1.8 and higher.
If your data source is 
    &lt;a href=&#34;/docs/grafana/v12.4/datasources/influxdb/configure-influxdb-data-source/&#34;&gt;configured for Flux&lt;/a&gt;, you can use
the &lt;a href=&#34;https://docs.influxdata.com/flux/v0/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Flux&lt;/a&gt; in the query editor, which serves as
a text editor for raw Flux queries with macro support.&lt;/p&gt;
&lt;p&gt;For more information and connection details, refer
to &lt;a href=&#34;https://github.com/influxdata/influxdb-client-go/#influxdb-18-api-compatibility&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;InfluxDB 1.8 API compatibility&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;use-macros&#34;&gt;Use macros&lt;/h3&gt;
&lt;p&gt;You can enter macros in the query to replace them with values from Grafana&amp;rsquo;s context.
Macros support copying and pasting from &lt;a href=&#34;https://www.influxdata.com/time-series-platform/chronograf/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Chronograf&lt;/a&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;Macro example&lt;/th&gt;
              &lt;th&gt;Replaced with&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;v.timeRangeStart&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The start of the currently active time selection, such as &lt;code&gt;2020-06-11T13:31:00Z&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;v.timeRangeStop&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The end of the currently active time selection, such as &lt;code&gt;2020-06-11T14:31:00Z&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;v.windowPeriod&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;An interval string compatible with Flux that corresponds to Grafana&amp;rsquo;s calculated interval based on the time range of the active time selection, such as &lt;code&gt;5s&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;v.defaultBucket&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The data source configuration&amp;rsquo;s &amp;ldquo;Default Bucket&amp;rdquo; setting.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;v.organization&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;The data source configuration&amp;rsquo;s &amp;ldquo;Organization&amp;rdquo; setting.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, consider the following Flux 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;flux&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-flux&#34;&gt;from(bucket: v.defaultBucket)
  |&amp;gt; range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |&amp;gt; filter(fn: (r) =&amp;gt; r[&amp;#34;_measurement&amp;#34;] == &amp;#34;cpu&amp;#34; or r[&amp;#34;_measurement&amp;#34;] == &amp;#34;swap&amp;#34;)
  |&amp;gt; filter(fn: (r) =&amp;gt; r[&amp;#34;_field&amp;#34;] == &amp;#34;usage_system&amp;#34; or r[&amp;#34;_field&amp;#34;] == &amp;#34;free&amp;#34;)
  |&amp;gt; aggregateWindow(every: v.windowPeriod, fn: mean)
  |&amp;gt; yield(name: &amp;#34;mean&amp;#34;)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This Flux query is interpolated into the following query and sent to InfluxDB, with the interval and time period values changing according to the active time selection:&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;flux&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-flux&#34;&gt;from(bucket: &amp;#34;grafana&amp;#34;)
  |&amp;gt; range(start: 2020-06-11T13:59:07Z, stop: 2020-06-11T14:59:07Z)
  |&amp;gt; filter(fn: (r) =&amp;gt; r[&amp;#34;_measurement&amp;#34;] == &amp;#34;cpu&amp;#34; or r[&amp;#34;_measurement&amp;#34;] == &amp;#34;swap&amp;#34;)
  |&amp;gt; filter(fn: (r) =&amp;gt; r[&amp;#34;_field&amp;#34;] == &amp;#34;usage_system&amp;#34; or r[&amp;#34;_field&amp;#34;] == &amp;#34;free&amp;#34;)
  |&amp;gt; aggregateWindow(every: 2s, fn: mean)
  |&amp;gt; yield(name: &amp;#34;mean&amp;#34;)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To view the interpolated version of a query with the Query inspector, refer to 
    &lt;a href=&#34;/docs/grafana/v12.4/panels-visualizations/panel-inspector/&#34;&gt;Panel Inspector&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;query-logs&#34;&gt;Query logs&lt;/h2&gt;
&lt;p&gt;You can query and display log data from InfluxDB in 
    &lt;a href=&#34;/docs/grafana/v12.4/explore/&#34;&gt;Explore&lt;/a&gt; and in the dashboard 
    &lt;a href=&#34;/docs/grafana/v12.4/panels-visualizations/visualizations/logs/&#34;&gt;Logs panel&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Select an InfluxDB data source in the Query editor. Under the &lt;strong&gt;Select measurement field&lt;/strong&gt; next to the &lt;strong&gt;FROM&lt;/strong&gt; section, choose a measurement containing your log data, then choose the appropriate fields that will display the log message. Add any additional filters by clicking the &lt;strong&gt;&#43; sign&lt;/strong&gt; next to the &lt;strong&gt;WHERE&lt;/strong&gt; field. Add additional conditions in the GROUP BY, ORDER BY and the rest of the options.&lt;/p&gt;
&lt;p&gt;After InfluxDB returns the results, the log panel displays log rows along with a bar chart. The x-axis represents time, while the y-axis shows the frequency or count.&lt;/p&gt;
&lt;h2 id=&#34;apply-annotations&#34;&gt;Apply annotations&lt;/h2&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/grafana/v12.4/dashboards/build-dashboards/annotate-visualizations/&#34;&gt;Annotations&lt;/a&gt; overlay rich event information on top of graphs.
You can add annotation queries in the dashboard menu&amp;rsquo;s &lt;strong&gt;Annotations view&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For InfluxDB, your query &lt;strong&gt;must&lt;/strong&gt; include &lt;code&gt;WHERE $timeFilter&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you select only one column, you don&amp;rsquo;t need to enter anything in the column mapping fields.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Tags&lt;/strong&gt; field&amp;rsquo;s value can be a comma-separated string.&lt;/p&gt;
&lt;h3 id=&#34;annotation-query-example&#34;&gt;Annotation query example&lt;/h3&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;SQL&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-sql&#34;&gt;SELECT title, description
from events
WHERE $timeFilter
ORDER BY time ASC&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="influxdb-query-editor">InfluxDB query editor&lt;/h1>
&lt;p>Grafana&amp;rsquo;s query editors are unique to each data source. For general information on Grafana query editors, refer to
&lt;a href="/docs/grafana/v12.4/panels-visualizations/query-transform-data/#query-editors">Query editors&lt;/a>. For general information on querying data sources in Grafana, refer to
&lt;a href="/docs/grafana/v12.4/panels-visualizations/query-transform-data/">Query and transform data&lt;/a>.&lt;/p></description></item><item><title>InfluxDB template variables</title><link>https://grafana.com/docs/grafana/v12.4/datasources/influxdb/template-variables/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/datasources/influxdb/template-variables/</guid><content><![CDATA[&lt;h1 id=&#34;influxdb-template-variables&#34;&gt;InfluxDB 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 displays these variables in drop-down select boxes at the top of the dashboard to help you change the data displayed in your dashboard. Grafana refers to such variables as template variables.&lt;/p&gt;
&lt;p&gt;For additional information using variables and templates, refer to the following documentation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/grafana/v12.4/dashboards/variables/&#34;&gt;Variables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/grafana/v12.4/dashboards/variables/&#34;&gt;Templates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/grafana/v12.4/dashboards/variables/add-template-variables/&#34;&gt;Add and manage variables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/grafana/v12.4/dashboards/variables/add-template-variables/#variable-best-practices&#34;&gt;Variable best practices&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;use-query-variables&#34;&gt;Use query variables&lt;/h2&gt;
&lt;p&gt;By adding a query template variable, you can write an InfluxDB metadata exploration query. These queries return results such as measurement names, key names, and key values.&lt;/p&gt;
&lt;p&gt;For more information, refer to 
    &lt;a href=&#34;/docs/grafana/v12.4/dashboards/variables/add-template-variables/#add-a-query-variable&#34;&gt;Add a query variable&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To create a variable containing all values for the &lt;code&gt;hostname&lt;/code&gt; tag, use the following query format in the &lt;strong&gt;Query&lt;/strong&gt; 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;SQL&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-sql&#34;&gt;SHOW TAG VALUES WITH KEY = &amp;#34;hostname&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;chain-or-nest-variables&#34;&gt;Chain or nest variables&lt;/h2&gt;
&lt;p&gt;You can also create nested variables, sometimes called 
    &lt;a href=&#34;/docs/grafana/v12.4/dashboards/variables/add-template-variables/#chained-variables&#34;&gt;chained variables&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For example, if you have a variable named &lt;code&gt;region&lt;/code&gt;, you can configure the &lt;code&gt;hosts&lt;/code&gt; variable to display only hosts from the selected region using the following 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;SQL&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-sql&#34;&gt;SHOW TAG VALUES WITH KEY = &amp;#34;hostname&amp;#34;  WHERE region = &amp;#39;$region&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can also fetch key names for a given measurement:&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;SQL&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-sql&#34;&gt;SHOW TAG KEYS [FROM &amp;lt;measurement_name&amp;gt;]&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If you have a variable containing key names, you can use it in a &lt;strong&gt;GROUP BY&lt;/strong&gt; clause. This allows you to adjust the grouping by selecting from the variable list at the top of the dashboard&lt;/p&gt;
&lt;h2 id=&#34;use-ad-hoc-filters&#34;&gt;Use ad hoc filters&lt;/h2&gt;
&lt;p&gt;InfluxDB supports the &lt;strong&gt;Ad hoc filters&lt;/strong&gt; variable type. This variable type allows you to define multiple key/value filters, which Grafana then automatically applies to all your InfluxDB queries.&lt;/p&gt;
&lt;p&gt;For more information, refer to 
    &lt;a href=&#34;/docs/grafana/v12.4/dashboards/variables/add-template-variables/#add-ad-hoc-filters&#34;&gt;Add ad hoc filters&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;choose-a-variable-syntax&#34;&gt;Choose a variable syntax&lt;/h2&gt;
&lt;p&gt;The InfluxDB data source supports two variable syntaxes for use in the &lt;strong&gt;Query&lt;/strong&gt; field:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;$&amp;lt;varname&amp;gt;&lt;/code&gt; - This syntax is easy to read and write but does not allow you to use a variable in the middle of a word or expression.&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;SQL&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-sql&#34;&gt;SELECT mean(&amp;#34;value&amp;#34;) FROM &amp;#34;logins&amp;#34; WHERE &amp;#34;hostname&amp;#34; =~ /^$host$/ AND $timeFilter GROUP BY time($__interval), &amp;#34;hostname&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;${varname}&lt;/code&gt; - Use this syntax when you want to interpolate a variable in the middle of an expression.&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;SQL&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-sql&#34;&gt;SELECT mean(&amp;#34;value&amp;#34;) FROM &amp;#34;logins&amp;#34; WHERE &amp;#34;hostname&amp;#34; =~ /^[[host]]$/ AND $timeFilter GROUP BY time($__interval), &amp;#34;hostname&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you enable the &lt;strong&gt;Multi-value&lt;/strong&gt; or &lt;strong&gt;Include all value&lt;/strong&gt; options, Grafana converts the labels from plain text to a regex-compatible string, so you must use &lt;code&gt;=~&lt;/code&gt; instead of &lt;code&gt;=&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;templated-dashboard-example&#34;&gt;Templated dashboard example&lt;/h3&gt;
&lt;p&gt;To view an example of a templated dashboard, refer to this &lt;a href=&#34;https://play.grafana.org/d/f62a0410-5abb-4dd8-9dfc-caddfc3e2ffd/eccb2445-b0a2-5e83-8e0f-6d5ea53ad575&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;InfluxDB example dashboard&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="influxdb-template-variables">InfluxDB 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 displays these variables in drop-down select boxes at the top of the dashboard to help you change the data displayed in your dashboard. Grafana refers to such variables as template variables.&lt;/p></description></item><item><title>Troubleshoot InfluxDB data source issues</title><link>https://grafana.com/docs/grafana/v12.4/datasources/influxdb/troubleshooting/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/datasources/influxdb/troubleshooting/</guid><content><![CDATA[&lt;h1 id=&#34;troubleshoot-influxdb-data-source-issues&#34;&gt;Troubleshoot InfluxDB data source issues&lt;/h1&gt;
&lt;p&gt;This document provides troubleshooting guidance for common errors you may encounter when using the InfluxDB data source in Grafana.&lt;/p&gt;
&lt;h2 id=&#34;connection-errors&#34;&gt;Connection errors&lt;/h2&gt;
&lt;p&gt;The following errors occur when Grafana cannot establish or maintain a connection to InfluxDB.&lt;/p&gt;
&lt;h3 id=&#34;failed-to-connect-to-influxdb&#34;&gt;Failed to connect to InfluxDB&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;error performing influxQL query&amp;rdquo; or &amp;ldquo;error performing flux query&amp;rdquo; or &amp;ldquo;error performing sql query&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; Grafana cannot establish a network connection to the InfluxDB server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify that the InfluxDB URL is correct in the data source configuration.&lt;/li&gt;
&lt;li&gt;Check that InfluxDB is running and accessible from the Grafana server.&lt;/li&gt;
&lt;li&gt;Ensure the URL includes the protocol (&lt;code&gt;http://&lt;/code&gt; or &lt;code&gt;https://&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Verify the port is correct (the InfluxDB default API port is &lt;code&gt;8086&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Ensure there are no firewall rules blocking the connection.&lt;/li&gt;
&lt;li&gt;For Grafana Cloud, ensure you have configured &lt;a href=&#34;/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/&#34;&gt;Private data source connect&lt;/a&gt; if your InfluxDB instance is not publicly accessible.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;request-timed-out&#34;&gt;Request timed out&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;context deadline exceeded&amp;rdquo; or &amp;ldquo;request timeout&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The connection to InfluxDB timed out before receiving a response.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check the network latency between Grafana and InfluxDB.&lt;/li&gt;
&lt;li&gt;Verify that InfluxDB is not overloaded or experiencing performance issues.&lt;/li&gt;
&lt;li&gt;Increase the timeout setting in the data source configuration under &lt;strong&gt;Advanced HTTP Settings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Reduce the time range or complexity of your query.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;authentication-errors&#34;&gt;Authentication errors&lt;/h2&gt;
&lt;p&gt;The following errors occur when there are issues with authentication credentials or permissions.&lt;/p&gt;
&lt;h3 id=&#34;unauthorized-401&#34;&gt;Unauthorized (401)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;401 Unauthorized&amp;rdquo; or &amp;ldquo;authorization failed&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The authentication credentials are invalid or missing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify that the token or password is correct in the data source configuration.&lt;/li&gt;
&lt;li&gt;For Flux and SQL, ensure the token has not expired.&lt;/li&gt;
&lt;li&gt;For InfluxQL with InfluxDB 2.x, verify the token is set as an &lt;code&gt;Authorization&lt;/code&gt; header with the value &lt;code&gt;Token &amp;lt;your-token&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;For InfluxDB 1.x, verify the username and password are correct.&lt;/li&gt;
&lt;li&gt;Check that the token has the required permissions to access the specified bucket or database.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;forbidden-403&#34;&gt;Forbidden (403)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;403 Forbidden&amp;rdquo; or &amp;ldquo;access denied&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The authenticated user or token does not have permission to access the requested resource.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify the token has read access to the specified bucket or database.&lt;/li&gt;
&lt;li&gt;Check the token&amp;rsquo;s permissions in the InfluxDB UI under &lt;strong&gt;API Tokens&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Ensure the organization ID is correct for Flux queries.&lt;/li&gt;
&lt;li&gt;For InfluxQL with InfluxDB 2.x, verify the DBRP mapping is configured correctly.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;configuration-errors&#34;&gt;Configuration errors&lt;/h2&gt;
&lt;p&gt;The following errors occur when the data source is not configured correctly.&lt;/p&gt;
&lt;h3 id=&#34;unknown-influx-version&#34;&gt;Unknown influx version&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;unknown influx version&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The query language is not properly configured in the data source settings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the data source configuration in Grafana.&lt;/li&gt;
&lt;li&gt;Verify that a valid query language is selected: &lt;strong&gt;Flux&lt;/strong&gt;, &lt;strong&gt;InfluxQL&lt;/strong&gt;, or &lt;strong&gt;SQL&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Ensure the selected query language matches your InfluxDB version:
&lt;ul&gt;
&lt;li&gt;Flux: InfluxDB 1.8&#43; and 2.x&lt;/li&gt;
&lt;li&gt;InfluxQL: InfluxDB 1.x and 2.x (with DBRP mapping)&lt;/li&gt;
&lt;li&gt;SQL: InfluxDB 3.x only&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;invalid-data-source-info-received&#34;&gt;Invalid data source info received&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;invalid data source info received&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The data source configuration is incomplete or corrupted.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Delete and recreate the data source.&lt;/li&gt;
&lt;li&gt;Ensure all required fields are populated based on your query language:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Flux:&lt;/strong&gt; URL, Organization, Token, Default Bucket&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;InfluxQL:&lt;/strong&gt; URL, Database, User, Password&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SQL:&lt;/strong&gt; URL, Database, Token&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;dbrp-mapping-required&#34;&gt;DBRP mapping required&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;database not found&amp;rdquo; or queries return no data with InfluxQL on InfluxDB 2.x&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; InfluxQL queries on InfluxDB 2.x require a Database and Retention Policy (DBRP) mapping.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a DBRP mapping in InfluxDB using the CLI or API.&lt;/li&gt;
&lt;li&gt;Refer to &lt;a href=&#34;https://docs.influxdata.com/influxdb/cloud/query-data/influxql/dbrp/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Manage DBRP Mappings&lt;/a&gt; for guidance.&lt;/li&gt;
&lt;li&gt;Verify the database name in Grafana matches the DBRP mapping.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;query-errors&#34;&gt;Query errors&lt;/h2&gt;
&lt;p&gt;The following errors occur when there are issues with query syntax or execution.&lt;/p&gt;
&lt;h3 id=&#34;query-syntax-error&#34;&gt;Query syntax error&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;error parsing query: found THING&amp;rdquo; or &amp;ldquo;failed to parse query: found WERE, expected ; at line 1, char 38&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The query contains invalid syntax.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Check your query syntax for typos or invalid keywords.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For InfluxQL, verify the query follows the correct syntax:&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;SQL&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-sql&#34;&gt;SELECT &amp;lt;field&amp;gt; FROM &amp;lt;measurement&amp;gt; WHERE &amp;lt;condition&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For Flux, ensure proper pipe-forward syntax and function calls.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the InfluxDB UI or CLI to test your query directly.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;query-timeout-limit-exceeded&#34;&gt;Query timeout limit exceeded&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;query-timeout limit exceeded&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The query took longer than the configured timeout limit in InfluxDB.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Reduce the time range of your query.&lt;/li&gt;
&lt;li&gt;Add more specific filters to limit the data scanned.&lt;/li&gt;
&lt;li&gt;Increase the query timeout setting in InfluxDB if you have admin access.&lt;/li&gt;
&lt;li&gt;Optimize your query to reduce complexity.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;too-many-series-or-data-points&#34;&gt;Too many series or data points&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;max-series-per-database limit exceeded&amp;rdquo; or &amp;ldquo;A query returned too many data points and the results have been truncated&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The query is returning more data than the configured limits allow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Reduce the time range of your query.&lt;/li&gt;
&lt;li&gt;Add filters to limit the number of series returned.&lt;/li&gt;
&lt;li&gt;Increase the &lt;strong&gt;Max series&lt;/strong&gt; setting in the data source configuration under &lt;strong&gt;Advanced Database Settings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Use aggregation functions to reduce the number of data points.&lt;/li&gt;
&lt;li&gt;For Flux, use &lt;code&gt;aggregateWindow()&lt;/code&gt; to downsample data.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;no-time-column-found&#34;&gt;No time column found&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;no time column found&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The query result does not include a time column, which is required for time series visualization.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ensure your query includes a time field.&lt;/li&gt;
&lt;li&gt;For Flux, verify the query includes &lt;code&gt;_time&lt;/code&gt; in the output.&lt;/li&gt;
&lt;li&gt;For SQL, ensure the query returns a timestamp column.&lt;/li&gt;
&lt;li&gt;Check that the time field is not being filtered out or excluded.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;health-check-errors&#34;&gt;Health check errors&lt;/h2&gt;
&lt;p&gt;The following errors occur when testing the data source connection.&lt;/p&gt;
&lt;h3 id=&#34;error-getting-flux-query-buckets&#34;&gt;Error getting flux query buckets&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;error getting flux query buckets&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The health check query &lt;code&gt;buckets()&lt;/code&gt; failed to return results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify the token has permission to list buckets.&lt;/li&gt;
&lt;li&gt;Check that the organization ID is correct.&lt;/li&gt;
&lt;li&gt;Ensure InfluxDB is running and accessible.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;error-connecting-influxdb-influxql&#34;&gt;Error connecting InfluxDB influxQL&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;error connecting InfluxDB influxQL&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The health check query &lt;code&gt;SHOW MEASUREMENTS&lt;/code&gt; failed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify the database name is correct.&lt;/li&gt;
&lt;li&gt;Check that the user has permission to run &lt;code&gt;SHOW MEASUREMENTS&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Ensure the database exists and contains measurements.&lt;/li&gt;
&lt;li&gt;For InfluxDB 2.x, verify DBRP mapping is configured.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;0-measurements-found&#34;&gt;0 measurements found&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Error message:&lt;/strong&gt; &amp;ldquo;data source is working. 0 measurements found&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The connection is successful, but the database contains no measurements.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify you are connecting to the correct database.&lt;/li&gt;
&lt;li&gt;Check that data has been written to the database.&lt;/li&gt;
&lt;li&gt;If the database is new, add some test data to verify the connection.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;other-common-issues&#34;&gt;Other common issues&lt;/h2&gt;
&lt;p&gt;The following issues don&amp;rsquo;t produce specific error messages but are commonly encountered.&lt;/p&gt;
&lt;h3 id=&#34;empty-query-results&#34;&gt;Empty query results&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The query returns no data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify the time range includes data in your database.&lt;/li&gt;
&lt;li&gt;Check that the measurement and field names are correct.&lt;/li&gt;
&lt;li&gt;Test the query directly in the InfluxDB UI or CLI.&lt;/li&gt;
&lt;li&gt;Ensure filters are not excluding all data.&lt;/li&gt;
&lt;li&gt;For InfluxQL, verify the retention policy contains data for the selected time range.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;slow-query-performance&#34;&gt;Slow query performance&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; Queries take a long time to execute.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Reduce the time range of your query.&lt;/li&gt;
&lt;li&gt;Add more specific filters to limit the data scanned.&lt;/li&gt;
&lt;li&gt;Increase the &lt;strong&gt;Min time interval&lt;/strong&gt; setting to reduce the number of data points.&lt;/li&gt;
&lt;li&gt;Check InfluxDB server performance and resource utilization.&lt;/li&gt;
&lt;li&gt;For Flux, use &lt;code&gt;aggregateWindow()&lt;/code&gt; to downsample data before visualization.&lt;/li&gt;
&lt;li&gt;Consider using continuous queries or tasks to pre-aggregate data.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;data-appears-delayed-or-missing-recent-points&#34;&gt;Data appears delayed or missing recent points&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Cause:&lt;/strong&gt; The visualization doesn&amp;rsquo;t show the most recent data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check the dashboard time range and refresh settings.&lt;/li&gt;
&lt;li&gt;Verify the &lt;strong&gt;Min time interval&lt;/strong&gt; is not set too high.&lt;/li&gt;
&lt;li&gt;Ensure InfluxDB has finished writing the data.&lt;/li&gt;
&lt;li&gt;Check for clock synchronization issues between Grafana and InfluxDB.&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 after following this troubleshooting guide:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check the &lt;a href=&#34;https://docs.influxdata.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;InfluxDB documentation&lt;/a&gt; for API-specific guidance.&lt;/li&gt;
&lt;li&gt;Review 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.&lt;/li&gt;
&lt;li&gt;Contact Grafana Support if you&amp;rsquo;re an Enterprise, Cloud Pro or Cloud Contracted user.&lt;/li&gt;
&lt;li&gt;When reporting issues, include:
&lt;ul&gt;
&lt;li&gt;Grafana version&lt;/li&gt;
&lt;li&gt;InfluxDB version and product (OSS, Cloud, Enterprise)&lt;/li&gt;
&lt;li&gt;Query language (Flux, InfluxQL, or SQL)&lt;/li&gt;
&lt;li&gt;Error messages (redact sensitive information)&lt;/li&gt;
&lt;li&gt;Steps to reproduce&lt;/li&gt;
&lt;li&gt;Relevant configuration such as data source settings, HTTP method, and TLS settings (redact tokens, passwords, and other credentials)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="troubleshoot-influxdb-data-source-issues">Troubleshoot InfluxDB data source issues&lt;/h1>
&lt;p>This document provides troubleshooting guidance for common errors you may encounter when using the InfluxDB data source in Grafana.&lt;/p>
&lt;h2 id="connection-errors">Connection errors&lt;/h2>
&lt;p>The following errors occur when Grafana cannot establish or maintain a connection to InfluxDB.&lt;/p></description></item></channel></rss>