diff --git a/content/enterprise_influxdb/v1/tools/grafana.md b/content/enterprise_influxdb/v1/tools/grafana.md index 2712796266..3d7ff5e97a 100644 --- a/content/enterprise_influxdb/v1/tools/grafana.md +++ b/content/enterprise_influxdb/v1/tools/grafana.md @@ -14,122 +14,111 @@ canonical: /influxdb/v2/tools/grafana/ Use [Grafana](https://grafana.com/) or [Grafana Cloud](https://grafana.com/products/cloud/) to visualize data from your **InfluxDB Enterprise** cluster. -{{% note %}} -#### Required -- The instructions in this guide require **Grafana Cloud** or **Grafana v10.3+**. - For information about using InfluxDB with other versions of Grafana, - see the [Grafana documentation](https://grafana.com/docs/grafana/latest/datasources/influxdb/). -- To use **Flux**, use **InfluxDB 1.8.1+** and [enable Flux](/influxdb/v1/flux/installation/) - in your InfluxDB configuration file. -{{% /note %}} - -1. [Set up an InfluxDB Enterprise cluster](/enterprise_influxdb/v1/introduction/installation/). -2. [Sign up for Grafana Cloud](https://grafana.com/products/cloud/) or - [download and install Grafana](https://grafana.com/grafana/download). -3. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally, - [start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit - in your browser. -4. In the left navigation of the Grafana UI, expand the **Connections** section - and click **Add new connection**. -5. Select **InfluxDB** from the list of available data sources and click - **Add data source**. -6. On the **Data Source configuration page**, enter a **name** for your InfluxDB data source. -7. In the **Query Language** drop-down menu, select one of the query languages - supported by InfluxDB {{< current-version >}} (InfluxQL or Flux): - - {{% note %}} -SQL is only supported in InfluxDB 3. - {{% /note %}} +> [!Note] +> #### Required +> - The instructions in this guide require **Grafana Cloud** or **Grafana v10.3+**. +> For information about using InfluxDB with other versions of Grafana, +> see the [Grafana documentation](https://grafana.com/docs/grafana/latest/datasources/influxdb/). +> - To use **Flux**, use **InfluxDB 1.8.1+** and [enable Flux](/enterprise_influxdb/v1/flux/installation/) +> in your InfluxDB data nodes. -{{< tabs-wrapper >}} -{{% tabs %}} -[InfluxQL](#) -[Flux](#) -{{% /tabs %}} - -{{% tab-content %}} -## Configure Grafana to use InfluxQL +- [Install Grafana](#install-grafana) +- [Create an InfluxDB data source](#create-an-influxdb-data-source) +- [Query and visualize data](#query-and-visualize-data) -With **InfluxQL** selected as the query language in your InfluxDB data source settings: +## Install Grafana -1. Under **HTTP**, enter the following: +1. [Set up an InfluxDB Enterprise cluster](/enterprise_influxdb/v1/introduction/installation/). +2. [Sign up for Grafana Cloud](https://grafana.com/products/cloud/) or + [download and install Grafana](https://grafana.com/grafana/download). +3. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally, + [start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit + in your browser. - - **URL**: Your **InfluxDB Enterprise URL** or **load balancer URL**. +> [!Note] +> #### Query language support +> - InfluxQL is supported in InfluxDB Enterprise v1.8.x and later. +> - Flux is supported in InfluxDB Enterprise v1.8.1 and later. +> - SQL is only supported in InfluxDB 3. - ```sh - http://localhost:8086 - ``` +## Create an InfluxDB data source -2. Under **InfluxDB Details**, enter the following: +1. In your Grafana interface, click **Connections** in the left sidebar +2. Click **Data sources** +3. In the **Data sources** page, click **Add new data source** +4. In the **Add data source** page, locate and click the **InfluxDB** card - - **Database**: your database name - - **User**: your InfluxDB username _(if [authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/))_ - - **Password**: your InfluxDB password _(if [authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/))_ - - **HTTP Method**: Select **GET** or **POST** _(for differences between the two, - see the [query HTTP endpoint documentation](/enterprise_influxdb/v1/tools/api/#query-http-endpoint))_ + The InfluxDB configuration page displays with four numbered sections in the left sidebar: -3. Provide a **[Min time interval](https://grafana.com/docs/grafana/latest/datasources/influxdb/#min-time-interval)** - (default is 10s). + 1. **URL and authentication** + 2. **Database settings** + 3. **Private data source connect** + 4. **Save & test** +5. Click **Add new connection** +6. Locate and click the **InfluxDB** card - {{< img-hd src="/img/influxdb/v1-tools-grafana-influxql.png" />}} + The InfluxDB configuration page displays with four numbered sections in the left sidebar. -4. Click **Save & Test**. Grafana attempts to connect to InfluxDB and returns - the result of the test. +7. **Name**: Enter a descriptive name for your data source +8. **URL**: Enter your InfluxDB Enterprise URL or load balancer URL: `http://localhost:8086` +9. **Product**: From the dropdown, select **InfluxDB Enterprise 1.x** +10. **Query Language**: Select **InfluxQL** or **Flux** -{{% /tab-content %}} - - -{{% tab-content %}} -## Configure Grafana to use Flux + After selecting your query language, section 2 (Database settings) displays fields specific to your selection. + +### Configure database settings -With **Flux** selected as the query language in your InfluxDB data source, -configure your InfluxDB connection: +The fields in this section change based on your query language selection. -1. Ensure [Flux is enabled](/enterprise_influxdb/v1/flux/installation/) in - your InfluxDB Enterprise data nodes. +{{< tabs-wrapper >}} +{{% tabs %}} +[InfluxQL](#) +[Flux](#) +{{% /tabs %}} +{{% tab-content %}} + -2. Under **HTTP**, enter the following: +## Configure Grafana to use InfluxQL - - **URL**: Your **InfluxDB Enterprise URL** or **load balancer URL**. +When you select **InfluxQL** as the query language, configure the following: - ```sh - http://localhost:8086 - ``` +- **Database**: Your database name +- **User**: Your InfluxDB username _(if [authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/))_ +- **Password**: Your InfluxDB password _(if [authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/))_ -3. Under **InfluxDB Details**, enter the following: +{{< img-hd src="/img/influxdb3/enterprise-v1-grafana-product-dropdown-flux.png" alt="InfluxQL configuration for InfluxDB Enterprise 1.x" />}} - - **Organization**: Provide an arbitrary value. - - **Token**: If [InfluxDB authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/), - provide your InfluxDB username and password using the following syntax: +Click **Save & Test**. Grafana attempts to connect to InfluxDB Enterprise and returns the result of the test. - ```sh - # Syntax - username:password + +{{% /tab-content %}} +{{% tab-content %}} + - # Example - johndoe:mY5uP3rS3crE7pA5Sw0Rd - ``` +## Configure Grafana to use Flux - If authentication is not enabled, leave blank. +When you select **Flux** as the query language, configure the following: - - **Default Bucket**: Provide a default database and retention policy combination - using the following syntax: +1. Ensure [Flux is enabled](/enterprise_influxdb/v1/flux/installation/) in your InfluxDB Enterprise data nodes. - ```sh - # Syntax - database-name/retention-policy-name +2. Configure the database settings: - # Examples - example-db/example-rp - telegraf/autogen - ``` + - **Organization**: Provide an arbitrary value (InfluxDB Enterprise 1.x does not use organizations) + - **Default Bucket**: Provide a default database and retention policy + - **Token**: If [InfluxDB authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/) - - **Min time interval**: [Grafana minimum time interval](https://grafana.com/docs/grafana/latest/features/datasources/influxdb/#min-time-interval). +{{< img-hd src="/img/influxdb3/enterprise-v1-grafana-product-dropdown-flux.png" alt="Flux configuration for InfluxDB Enterprise 1.x" />}} - {{< img-hd src="/img/influxdb/v1-tools-grafana-flux.png" />}} +Click **Save & Test**. Grafana attempts to connect to InfluxDB Enterprise and returns the result of the test. -3. Click **Save & Test**. Grafana attempts to connect to InfluxDB and returns - the result of the test. -{{% /tab-content %}} +{{% /tab-content %}} {{< /tabs-wrapper >}} + +## Query and visualize data + +With your InfluxDB connection configured, use Grafana to query and visualize time series data. + +For more information, see: +- [Grafana documentation](https://grafana.com/docs/grafana/latest/) +- [Get started with Flux](/flux/v0/get-started/) \ No newline at end of file diff --git a/content/influxdb/v1/tools/grafana.md b/content/influxdb/v1/tools/grafana.md index b19bb6e182..44735ea42e 100644 --- a/content/influxdb/v1/tools/grafana.md +++ b/content/influxdb/v1/tools/grafana.md @@ -25,112 +25,92 @@ to visualize data from your **InfluxDB v1.11** instance. in your InfluxDB configuration file. {{% /note %}} -1. [Start InfluxDB](/influxdb/v1/introduction/get-started/). -2. [Sign up for Grafana Cloud](https://grafana.com/products/cloud/) or - [download and install Grafana](https://grafana.com/grafana/download). -3. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally, - [start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit - in your browser. -4. In the left navigation of the Grafana UI, expand the **Connections** section - and click **Add new connection**. -5. Select **InfluxDB** from the list of available data sources and click - **Add data source**. -6. On the **Data Source configuration page**, enter a **name** for your InfluxDB data source. -7. In the **Query Language** drop-down menu, select one of the query languages - supported by InfluxDB {{< current-version >}} (InfluxQL or Flux): - - {{% note %}} -SQL is only supported in InfluxDB 3. - {{% /note %}} +- [Install Grafana](#install-grafana) +- [Create an InfluxDB data source](#create-an-influxdb-data-source) +- [Query and visualize data](#query-and-visualize-data) -{{< tabs-wrapper >}} -{{% tabs %}} -[InfluxQL](#) -[Flux](#) -{{% /tabs %}} - -{{% tab-content %}} -## Configure Grafana to use InfluxQL +## Install Grafana -With **InfluxQL** selected as the query language in your InfluxDB data source settings: +1. [Start InfluxDB](/influxdb/v1/introduction/get-started/). +2. [Sign up for Grafana Cloud](https://grafana.com/products/cloud/) or + [download and install Grafana](https://grafana.com/grafana/download). +3. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally, + [start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit + in your browser. -1. Under **HTTP**, enter the following: +{{% note %}} +SQL is only supported in InfluxDB 3. +{{% /note %}} - - **URL**: Your **InfluxDB URL**. +## Create an InfluxDB data source - ```sh - http://localhost:8086 - ``` +1. In your Grafana interface, click **Connections** in the left sidebar +2. Click **Data sources** +3. Click **Add new connection** +4. Locate and click the **InfluxDB** card -2. Under **InfluxDB Details**, enter the following: + The InfluxDB configuration page displays with four numbered sections in the left sidebar. - - **Database**: your database name - - **User**: your InfluxDB username _(if [authentication is enabled](/influxdb/v1/administration/authentication_and_authorization/))_ - - **Password**: your InfluxDB password _(if [authentication is enabled](/influxdb/v1/administration/authentication_and_authorization/))_ - - **HTTP Method**: Select **GET** or **POST** _(for differences between the two, - see the [query HTTP endpoint documentation](/influxdb/v1/tools/api/#query-http-endpoint))_ +5. **Name**: Enter a descriptive name for your data source +6. **URL**: Enter your InfluxDB URL: `http://localhost:8086` +7. **Product**: From the dropdown, select **InfluxDB OSS 1.x** +8. **Query Language**: Select **InfluxQL** or **Flux** -3. Provide a **[Min time interval](https://grafana.com/docs/grafana/latest/datasources/influxdb/#min-time-interval)** - (default is 10s). + After selecting your query language, section 2 (Database settings) displays fields specific to your selection. - {{< img-hd src="/img/influxdb/v1-tools-grafana-influxql.png" />}} +### Configure database settings -4. Click **Save & Test**. Grafana attempts to connect to InfluxDB and returns - the result of the test. +The fields in this section change based on your query language selection. -{{% /tab-content %}} - - +{{< tabs-wrapper >}} +{{% tabs %}} +[InfluxQL](#) +[Flux](#) +{{% /tabs %}} {{% tab-content %}} -## Configure Grafana to use Flux - -With **Flux** selected as the query language in your InfluxDB data source, -configure your InfluxDB connection: - -1. Ensure [Flux is enabled](/influxdb/v1/flux/installation/) in InfluxDB. + -2. Under **HTTP**, enter the following: +## Configure Grafana to use InfluxQL - - **URL**: Your **InfluxDB URL**. +When you select **InfluxQL** as the query language, configure the following: - ```sh - http://localhost:8086 - ``` +- **Database**: Your database name +- **User**: Your InfluxDB username _(if [authentication is enabled](/influxdb/v1/administration/authentication_and_authorization/)); leave blank if authentication is disabled._ +- **Password**: Your InfluxDB password _(if [authentication is enabled](/influxdb/v1/administration/authentication_and_authorization/)); leave blank if authentication is disabled._ -3. Under **InfluxDB Details**, enter the following: +{{< img-hd src="/img/influxdb3/OSS-v1-grafana-product-dropdown-influxql.png" alt="InfluxQL configuration for InfluxDB OSS 1.x" />}} - - **Organization**: Provide an arbitrary value. - - **Token**: If [InfluxDB authentication is enabled](/influxdb/v1/administration/authentication_and_authorization/), - provide your InfluxDB username and password using the following syntax: +Click **Save & Test**. Grafana attempts to connect to InfluxDB and returns the result of the test. - ```sh - # Syntax - username:password + +{{% /tab-content %}} +{{% tab-content %}} + - # Example - johndoe:mY5uP3rS3crE7pA5Sw0Rd - ``` +## Configure Grafana to use Flux - If authentication is not enabled, leave blank. +When you select **Flux** as the query language, configure the following: - - **Default Bucket**: Provide a default database and retention policy combination - using the following syntax: +1. Ensure [Flux is enabled](/influxdb/v1/flux/installation/) in your InfluxDB configuration file. - ```sh - # Syntax - database-name/retention-policy-name +2. Configure the database settings: - # Examples - example-db/example-rp - telegraf/autogen - ``` + - **Organization**: Provide an arbitrary value (InfluxDB 1.x does not use organizations) + - **Default Bucket**: Provide a default database and retention policy + - **Token**: If [InfluxDB authentication is enabled](/influxdb/v1/administration/authentication_and_authorization/) provide your InfluxDB username and password - - **Min time interval**: [Grafana minimum time interval](https://grafana.com/docs/grafana/latest/features/datasources/influxdb/#min-time-interval). +{{< img-hd src="/img/influxdb3/OSS-v1-grafana-product-dropdown-flux.png" alt="Flux configuration for InfluxDB OSS 1.x" />}} - {{< img-hd src="/img/influxdb/v1-tools-grafana-flux.png" />}} +Click **Save & Test**. Grafana attempts to connect to InfluxDB and returns the result of the test. -3. Click **Save & Test**. Grafana attempts to connect to InfluxDB and returns - the result of the test. -{{% /tab-content %}} +{{% /tab-content %}} {{< /tabs-wrapper >}} + +## Query and visualize data + +With your InfluxDB connection configured, use Grafana to query and visualize time series data. + +For more information, see: +- [Grafana documentation](https://grafana.com/docs/grafana/latest/) +- [Get started with Flux](/flux/v0/get-started/) \ No newline at end of file diff --git a/content/influxdb3/core/visualize-data/grafana.md b/content/influxdb3/core/visualize-data/grafana.md index 66ae09bcf3..e6e22ec159 100644 --- a/content/influxdb3/core/visualize-data/grafana.md +++ b/content/influxdb3/core/visualize-data/grafana.md @@ -17,9 +17,7 @@ alt_links: cloud-serverless: /influxdb3/cloud-serverless/process-data/visualize/grafana/ cloud-dedicated: /influxdb3/cloud-dedicated/process-data/visualize/grafana/ clustered: /influxdb3/clustered/process-data/visualize/grafana/ -source: /shared/influxdb3-visualize/grafana.md +source: /content/shared/v3-process-data/visualize/grafana.md --- - + diff --git a/content/influxdb3/enterprise/visualize-data/grafana.md b/content/influxdb3/enterprise/visualize-data/grafana.md index 0d1baf5532..61fda611ec 100644 --- a/content/influxdb3/enterprise/visualize-data/grafana.md +++ b/content/influxdb3/enterprise/visualize-data/grafana.md @@ -17,9 +17,7 @@ alt_links: cloud-serverless: /influxdb3/cloud-serverless/process-data/visualize/grafana/ cloud-dedicated: /influxdb3/cloud-dedicated/process-data/visualize/grafana/ clustered: /influxdb3/clustered/process-data/visualize/grafana/ -source: /shared/influxdb3-visualize/grafana.md +source: /content/shared/v3-process-data/visualize/grafana.md --- - + diff --git a/content/shared/influxdb-client-libraries-reference/flight/_index.md b/content/shared/influxdb-client-libraries-reference/flight/_index.md index edf8ffdb6d..636ab063f6 100644 --- a/content/shared/influxdb-client-libraries-reference/flight/_index.md +++ b/content/shared/influxdb-client-libraries-reference/flight/_index.md @@ -14,6 +14,14 @@ Using InfluxDB 3's IOx-specific Flight RPC protocol, clients send a single `DoGe **Flight SQL clients** use the [Flight SQL protocol](https://arrow.apache.org/docs/format/FlightSql.html) for querying an SQL database server. They can use SQL to query data stored in an {{% product-name %}} database, but they can't use InfuxQL. +> [!Important] +> #### Flight SQL requires HTTP/2 +> +> Flight SQL uses gRPC, which requires **HTTP/2**. +> If you connect to {{% product-name %}} through a proxy (such as HAProxy, nginx, or a load balancer), +> verify that your proxy is configured to support HTTP/2. +> Without HTTP/2 support, Flight SQL connections will fail. + Clients are maintained by Apache Arrow projects or third-parties. For specifics about a Flight client, see the client's GitHub repository. diff --git a/content/shared/influxdb-v2/tools/grafana.md b/content/shared/influxdb-v2/tools/grafana.md index 621fa6c3df..d59644e193 100644 --- a/content/shared/influxdb-v2/tools/grafana.md +++ b/content/shared/influxdb-v2/tools/grafana.md @@ -5,179 +5,116 @@ to visualize data from your **InfluxDB {{< current-version >}}** instance. The instructions in this guide require **Grafana Cloud** or **Grafana 10.3+**. {{% /note %}} -1. {{% show-in "cloud,cloud-serverless" %}}[Log into InfluxDB Cloud](https://cloud2.influxdata.com).{{% /show-in %}} - {{% show-in "v2" %}}[Start InfluxDB](/influxdb/version/install/#configure-and-start-influxdb).{{% /show-in %}} -2. [Sign up for Grafana Cloud](https://grafana.com/products/cloud/) or - [download and install Grafana](https://grafana.com/grafana/download). -3. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally, - [start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit - in your browser. -4. In the left navigation of the Grafana UI, open the **Connections** section - and select **Add new connection**. -5. Select **InfluxDB** from the list of available data sources and click - **Add new data source**. -6. On the **Data Source configuration page**, enter a **name** for your InfluxDB data source. -7. In the **Query Language** drop-down menu, select one of the query languages - supported by InfluxDB {{< current-version >}} (Flux or InfluxQL): +- [Install Grafana](#install-grafana) +- [Create an InfluxDB data source](#create-an-influxdb-data-source) +- [Query and visualize data](#query-and-visualize-data) + +## Install Grafana + +1. [Start InfluxDB OSS 2.x](/influxdb/v2/install/#configure-and-start-influxdb). +2. [Sign up for Grafana Cloud](https://grafana.com/products/cloud/) or + [download and install Grafana](https://grafana.com/grafana/download). +3. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally, + [start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit + in your browser. {{% note %}} SQL is only supported in InfluxDB 3. {{% /note %}} -{{< tabs-wrapper >}} -{{% tabs %}} -[Flux](#) -[InfluxQL](#) -{{% /tabs %}} -{{% tab-content %}} -## Configure Grafana to use Flux - -With **Flux** selected as the query language in your InfluxDB data source, -configure your InfluxDB connection: - -1. Under **HTTP**, enter the following: +## Create an InfluxDB data source - - **URL**: Your - {{% show-in "v2" %}}[InfluxDB URL](/influxdb/version/reference/urls/).{{% /show-in %}} - {{% show-in "cloud,cloud-serverless" %}}[InfluxDB Cloud region URL](/influxdb/version/reference/regions/).{{% /show-in %}} +1. In your Grafana interface, click **Connections** in the left sidebar +2. Click **Data sources** +3. Click **Add new connection** +4. Locate and click the **InfluxDB** card - ```sh - http://localhost:8086/ - ``` + The InfluxDB configuration page displays with four numbered sections in the left sidebar. -2. Under **InfluxDB Details**, enter the following: +5. **Name**: Enter a descriptive name for your data source +6. **URL**: Enter your [InfluxDB URL](/influxdb/v2/reference/urls/): http://localhost:8086 - - **Organization**: Your InfluxDB [organization name **or** ID](/influxdb/version/admin/organizations/view-orgs/). - - **Token**: Your InfluxDB [API token](/influxdb/version/admin/tokens/). - - **Default Bucket**: The default [bucket](/influxdb/version/admin/buckets/) to - use in Flux queries. - - **Min time interval**: The [Grafana minimum time interval](https://grafana.com/docs/grafana/latest/features/datasources/influxdb/#min-time-interval). - Default is `10s` - - **Max series**: The maximum number of series or tables Grafana will process. - Default is `1000`. +7. **Product**: From the dropdown, select {{% show-in "v2" %}}**InfluxDB OSS 2.x**{{% /show-in %}}{{% show-in "cloud" %}}**InfluxDB Cloud (TSM)**{{% /show-in %}} +8. **Query Language**: Select **Flux** or **InfluxQL** -3. Click **Save & Test**. Grafana attempts to connect to the InfluxDB {{< current-version >}} - datasource and returns the results of the test. + After selecting your query language, section 2 (Database settings) displays fields specific to your selection. -{{% show-in "cloud,cloud-serverless" %}} - {{< img-hd src="/img/influxdb/cloud-tools-grafana-flux.png" alt="Use Grafana with InfluxDB Cloud and Flux" />}} -{{% /show-in %}} +### Configure database settings -{{% show-in "v2" %}} - {{< img-hd src="/img/influxdb/version-tools-grafana-flux.png" alt="Use Grafana with InfluxDB and Flux" />}} -{{% /show-in %}} +The fields in this section change based on your query language selection. -{{% /tab-content %}} - - +{{< tabs-wrapper >}} +{{% tabs %}} +[Flux](#) +[InfluxQL](#) +{{% /tabs %}} {{% tab-content %}} + -## Configure Grafana to use InfluxQL - - - - -{{% show-in "v2" %}} - -To query InfluxDB {{< current-version >}} with InfluxQL, find your use case below, -and then complete the instructions to configure Grafana: - -- [Installed a new InfluxDB {{< current-version >}} instance](#installed-a-new-influxdb-instance) -- [Upgraded from InfluxDB 1.x to {{< current-version >}} (following the official upgrade)](#upgraded-from-influxdb-1x-to-2x) -- [Manually migrated from InfluxDB 1.x to {{< current-version >}}](#manually-migrated-from-influxdb-1x-to-2x) - -### Installed a new InfluxDB instance - -To configure Grafana to use InfluxQL with a new install of InfluxDB {{< current-version >}}, do the following: +## Configure Grafana to use Flux -1. [Authenticate with InfluxDB {{< current-version >}} tokens](/influxdb/version/admin/tokens/). -2. [Manually create DBRP mappings](#view-and-create-influxdb-dbrp-mappings). +When you select **Flux** as the query language, configure the following: -### Upgraded from InfluxDB 1.x to 2.x +- **Organization**: Your InfluxDB [organization name or ID](/influxdb/v2/admin/organizations/view-orgs/) +- **Default Bucket**: The default [bucket](/influxdb/v2/admin/buckets/) to use in Flux queries +- **Token**: Your InfluxDB [API token](/influxdb/v2/admin/tokens/) -To configure Grafana to use InfluxQL when you've upgraded from InfluxDB 1.x to -InfluxDB {{< current-version >}} (following an [official upgrade guide](/influxdb/version/upgrade/v1-to-v2/)): +{{% show-in "v2" %}}{{< img-hd src="/img/influxdb/OSS-v2-grafana-product-dropdown-flux.png" alt="Flux configuration for InfluxDB OSS 2.x" />}}{{% /show-in %}} +{{% show-in "cloud" %}}{{< img-hd src="/img/influxdb/cloud-tools-grafana-flux.png" alt="Flux configuration for InfluxDB Cloud (TSM)" />}}{{% /show-in %}} -1. Authenticate using the _non-admin_ [v1 compatible authentication credentials](#view-and-create-influxdb-v1-authorizations) - created during the upgrade process. -2. Use the DBRP mappings InfluxDB automatically created in the upgrade process (no action necessary). +Click **Save & Test**. Grafana attempts to connect to {{% show-in "v2" %}}InfluxDB OSS 2.x{{% /show-in %}}{{% show-in "cloud" %}}InfluxDB Cloud{{% /show-in %}} and returns the results of the test. -### Manually migrated from InfluxDB 1.x to 2.x + +{{% /tab-content %}} +{{% tab-content %}} + -To configure Grafana to use InfluxQL when you've manually migrated from InfluxDB -1.x to InfluxDB {{< current-version >}}, do the following: +## Configure Grafana to use InfluxQL -1. If your InfluxDB 1.x instance required authentication, - [create v1 compatible authentication credentials](#view-and-create-influxdb-v1-authorizations) - to match your previous 1.x username and password. - Otherwise, use [InfluxDB v2 token authentication](/influxdb/version/admin/tokens/). -2. [Manually create DBRP mappings](#view-and-create-influxdb-dbrp-mappings). +> [!Important] +> #### DBRP mapping required +> +> To query InfluxDB OSS 2.x with InfluxQL, you must first create Database and Retention Policy (DBRP) mappings. +> The configuration form displays a warning if DBRP mapping is required. -{{< expand-wrapper >}} -{{% expand "View and create InfluxDB v1 authorizations" %}} +When you select **InfluxQL** as the query language, you can authenticate using either tokens or username/password credentials. -InfluxDB {{< current-version >}} provides a 1.x compatible authentication API that lets you -authenticate with a username and password like InfluxDB 1.x -_(separate from the credentials used to log into the InfluxDB user interface)_. +### Token authentication (recommended) -#### View existing v1 authorizations +Configure the following fields: -Use the [`influx v1 auth list`](/influxdb/version/reference/cli/influx/v1/auth/list/) -to list existing InfluxDB v1 compatible authorizations. +- **Database**: The database name [mapped to your InfluxDB bucket](#create-dbrp-mappings) +- **User**: Enter any string (this field is required by the form) +- **Password**: Your InfluxDB [API token](/influxdb/v2/admin/tokens/) -```sh -influx v1 auth list -``` +### Username and password authentication -#### Create a v1 authorization +Configure the following fields: -Use the [`influx v1 auth create` command](/influxdb/version/reference/cli/influx/v1/auth/create/) -to grant read/write permissions to specific buckets. Provide the following: +- **Database**: The database name [mapped to your InfluxDB bucket](#create-dbrp-mappings) +- **User**: Your [v1 authorization username](#create-v1-authorizations) +- **Password**: Your [v1 authorization password](#create-v1-authorizations) -- [bucket IDs](/influxdb/version/admin/buckets/view-buckets/) to grant read - or write permissions to -- new username -- new password _(when prompted)_ +{{% show-in "v2" %}}{{< img-hd src="/img/influxdb/OSS-v2-grafana-product-dropdown-influxql.png" alt="InfluxQL configuration for InfluxDB OSS 2.x with DBRP warning" />}}{{% /show-in %}} +{{% show-in "cloud" %}}{{< img-hd src="/img/influxdb/influxdb-v2-cloud-influxql.png" alt="InfluxQL configuration for InfluxDB Cloud (TSM) with v1 auth" />}}{{% /show-in %}} - -```sh -influx v1 auth create \ - --read-bucket 00xX00o0X001 \ - --write-bucket 00xX00o0X001 \ - --username example-user -``` -{{% /expand %}} -{{< expand "View and create InfluxDB DBRP mappings" >}} +Click **Save & Test**. Grafana attempts to connect to {{% show-in "v2" %}}InfluxDB OSS 2.x{{% /show-in %}}{{% show-in "cloud" %}}InfluxDB Cloud{{% /show-in %}} and returns the results of the test. -When using InfluxQL to query InfluxDB, the query must specify a database and a retention policy. -InfluxDB DBRP mappings associate database and retention policy combinations with -InfluxDB {{< current-version >}} [buckets](/influxdb/version/reference/glossary/#bucket). +### Create DBRP mappings -DBRP mappings do not affect the retention period of the target bucket. -These mappings allow queries following InfluxDB 1.x conventions to successfully -query InfluxDB {{< current-version >}} buckets. +When using InfluxQL to query InfluxDB, the query must specify a database and retention policy. +InfluxDB DBRP mappings associate database and retention policy combinations with InfluxDB OSS 2.x buckets. #### View existing DBRP mappings -Use the [`influx v1 dbrp list`](/influxdb/version/reference/cli/influx/v1/dbrp/list/) -to list existing DBRP mappings. - +Use the [`influx v1 dbrp list`](/influxdb/v2/reference/cli/influx/v1/dbrp/list/) command: ```sh influx v1 dbrp list ``` -#### Create a DBRP mapping - -Use the [`influx v1 dbrp create` command](/influxdb/version/reference/cli/influx/v1/dbrp/create/) -command to create a DBRP mapping. -Provide the following: - -- database name -- retention policy name _(not retention period)_ -- [bucket ID](/influxdb/version/admin/buckets/view-buckets/) -- _(optional)_ `--default` flag if you want the retention policy to be the default retention - policy for the specified database +### Create a DBRP mappings +Use the influx v1 dbrp create command: ```sh influx v1 dbrp create \ --db example-db \ @@ -185,169 +122,52 @@ influx v1 dbrp create \ --bucket-id 00xX00o0X001 \ --default ``` + +Provide: -{{% note %}} -#### Repeat for each DBRP combination +- `--db:` Database name +- `--rp:` Retention policy name (not retention period) +- `--bucket-id:` Bucket ID +- `--default:` (Optional) Make this the default retention policy for the database -Each unique database and retention policy combination used by Grafana must be -mapped to an InfluxDB {{< current-version >}} bucket. -If you have multiple retention policies for a single bucket, set one of the the -retention polices as the default using the `--default` flag. +{{% note %}} +**Repeat for each DBRP combination** +Each unique database and retention policy combination used by Grafana must be mapped to an InfluxDB OSS 2.x bucket. {{% /note %}} -_For more information about DBRP mapping, see -[Database and retention policy mapping](/influxdb/version/reference/api/influxdb-1x/dbrp/)._ - -{{< /expand >}} -{{< /expand-wrapper >}} - -{{% /show-in %}} - - - - - - - -{{% show-in "cloud,cloud-serverless" %}} +For more information, see [Database and retention policy mapping](/influxdb/v2/api-guide/influxdb-1x/dbrp/). -To query InfluxDB Cloud from Grafana using InfluxQL: +### Create v1 authorizations -1. [Download and set up the `influx` CLI](#download-and-set-up-the-influx-cli) -2. [Create an InfluxDB DBRP mapping](#create-an-influxdb-dbrp-mapping) -3. [Configure your InfluxDB connection](#configure-your-influxdb-connection) +InfluxDB OSS 2.x provides a v1-compatible authentication API for username/password authentication. -### Download and set up the influx CLI - -1. [Download the latest version of the `influx` CLI](/influxdb/cloud/sign-up/#optional-download-install-and-use-the-influx-cli) - appropriate for your local operating system. -2. Create a CLI configuration that provides the required InfluxDB Cloud **host**, - **organization**, and **API token** to all CLI commands. - Use the [`influx config create` command](/influxdb/cloud/reference/cli/influx/config/create/) - and provide the following: - - - [InfluxDB Cloud URL](/influxdb/cloud/reference/regions/) - - [organization name](/influxdb/cloud/admin/organizations/) _(by default, your email address)_ - - [API token](/influxdb/cloud/admin/tokens/) - - ```sh - influx config create \ - --config-name example-config-name \ - --host-url https://{{< influxdb/host >}} \ - --org example-org \ - --token My5uP3rSeCr37t0k3n - ``` - - For more information about `influx` CLI configurations, - see [`influx config`](/influxdb/cloud/reference/cli/influx/config/). - -### Create an InfluxDB DBRP mapping - -When using InfluxQL to query InfluxDB Cloud, the query must specify a database and a retention policy. -Use the [`influx v1 dbrp create` command](/influxdb/cloud/reference/cli/influx/v1/dbrp/create/) -command to create a database/retention policy (DBRP) mapping that associates a database -and retention policy combination with an InfluxDB Cloud [bucket](/influxdb/cloud/reference/glossary/#bucket). - -DBRP mappings do not affect the retention period of the target bucket. -These mappings allow queries following InfluxDB 1.x conventions to successfully -query InfluxDB Cloud buckets. - -{{% note %}} -##### Automatically create DBRP mappings on write - -When using the InfluxDB 1.x compatibility API to write data to InfluxDB Cloud, -InfluxDB Cloud automatically creates DBRP mappings for buckets whose names match the -`db/rp` naming pattern of the database and retention policy specified in the write request. -For more information, see [Database and retention policy mapping – Writing data](/influxdb/cloud/reference/api/influxdb-1x/dbrp/#when-writing-data). -{{% /note %}} - -Provide the following: - -- database name -- [retention policy](/influxdb/v1/concepts/glossary/#retention-policy-rp) name _(not retention period)_ -- [bucket ID](/influxdb/cloud/admin/buckets/view-buckets/) -- _(optional)_ `--default` flag if you want the retention policy to be the default retention - policy for the specified database +#### View existing v1 authorizations +Use the [`influx v1 auth list`](/influxdb/v2/reference/cli/influx/v1/auth/list/) command: ```sh -influx v1 dbrp create \ - --db example-db \ - --rp example-rp \ - --bucket-id 00xX00o0X001 \ - --default +influx v1 auth list ``` -{{% note %}} -#### Repeat for each DBRP combination - -Each unique database and retention policy combination used by Grafana must be -mapped to an InfluxDB {{< current-version >}} bucket. -If you have multiple retention policies for a single bucket, set one of the the -retention polices as the default using the `--default` flag. -{{% /note %}} - -_For more information about DBRP mapping, see -[Database and retention policy mapping](/influxdb/cloud/reference/api/influxdb-1x/dbrp/)._ - -{{% /show-in %}} - - - - - -### Configure your InfluxDB connection - -With **InfluxQL** selected as the query language in your InfluxDB data source settings: - -1. Under **HTTP**, enter the following: - - - **URL**: Your [InfluxDB URL](/influxdb/version/reference/urls/). - - ```sh - http://localhost:8086/ - ``` - -2. Configure InfluxDB authentication: - - - ##### Token authentication - - - Under **Custom HTTP Headers**, select **{{< icon "plus" >}}Add Header**. Provide your InfluxDB API token: - - - **Header**: Enter `Authorization` - - **Value**: Use the `Token` schema and provide your [InfluxDB API token](/influxdb/version/admin/tokens/). - For example: - - ``` - Token y0uR5uP3rSecr3tT0k3n - ``` - - - Under **InfluxDB Details**, do the following: - - - **Database**: Enter the database name [mapped to your InfluxDB {{< current-version >}} bucket](#view-and-create-influxdb-dbrp-mappings) - - **HTTP Method**: Select **GET** - - - ##### Authenticate with username and password - - Under **InfluxDB Details**, do the following: +#### Create a v1 authorization - - **Database**: Enter the database name [mapped to your InfluxDB {{< current-version >}} bucket](#view-and-create-influxdb-dbrp-mappings) - - **User**: Enter the username associated with your [InfluxDB 1.x compatibility authorization](#view-and-create-influxdb-v1-authorizations) - - **Password**: Enter the password associated with your [InfluxDB 1.x compatibility authorization](#view-and-create-influxdb-dbrp-mappings) - - **HTTP Method**: Select **GET** +Use the [`influx v1 auth create`](/influxdb/v2/reference/cli/influx/v1/auth/create/) command: +```sh +influx v1 auth create \ + --read-bucket 00xX00o0X001 \ + --write-bucket 00xX00o0X001 \ + --username example-user +``` -3. Click **Save & Test**. Grafana attempts to connect to the InfluxDB {{< current-version >}} data source - and returns the results of the test. +Provide: -{{% show-in "cloud,cloud-serverless" %}} - {{< img-hd src="/img/influxdb/cloud-tools-grafana-influxql.png" alt="Use Grafana with InfluxDB Cloud and Flux" />}} -{{% /show-in %}} +- `--read-bucket`: Bucket ID to grant read permissions +- `--write-bucket`: Bucket ID to grant write permissions +- `--username`: New username -{{< show-in "v2" >}} - {{< img-hd src="/img/influxdb/version-tools-grafana-influxql.png" alt="Use Grafana with InfluxDB and Flux" />}} -{{< /show-in >}} +You'll be prompted to enter a password. + {{% /tab-content %}} - {{< /tabs-wrapper >}} ## Query and visualize data diff --git a/content/shared/influxdb3-visualize/grafana.md b/content/shared/influxdb3-visualize/grafana.md index 06dbf82bca..fd7da0d8e9 100644 --- a/content/shared/influxdb3-visualize/grafana.md +++ b/content/shared/influxdb3-visualize/grafana.md @@ -10,6 +10,7 @@ Use [Grafana](https://grafana.com/) to query and visualize data from - [Install Grafana or login to Grafana Cloud](#install-grafana-or-login-to-grafana-cloud) - [InfluxDB data source](#influxdb-data-source) +- [Before you begin](#before-you-begin) - [Create an InfluxDB data source](#create-an-influxdb-data-source) - [Query InfluxDB with Grafana](#query-influxdb-with-grafana) - [Build visualizations with Grafana](#build-visualizations-with-grafana) @@ -33,15 +34,33 @@ both SQL and InfluxQL. > The instructions below are for **Grafana 10.3+** which introduced the newest > version of the InfluxDB core plugin. > The updated plugin includes **SQL support** for InfluxDB 3-based products such -> as {{< product-name >}}. +> as {{< product-name >}}, and the interface dynamically adapts based on your product and query language selections. + + +## Before you begin + +**Prerequisites:** +- Grafana 10.3 or later +- Administrator role in Grafana +- {{% product-name %}} instance and [database token](/influxdb3/version/admin/tokens/#database-tokens) ## Create an InfluxDB data source -1. In your Grafana user interface (UI), navigate to **Data Sources**. -2. Click **Add new data source**. -3. Search for and select the **InfluxDB** plugin. -4. Provide a name for your data source. -5. Under **Query Language**, select either **SQL** or **InfluxQL**: +1. In your Grafana interface, click **Connections** in the left sidebar +2. Click **Data sources** +3. Click **Add new data source** +4. Under **Time series databases**, select **InfluxDB** + +The configuration form displays with four numbered sections. Section 2 (Database settings) displays different fields based on your query language selection. + +5. **Name**: Enter a descriptive name for your data source +6. **URL**: Enter your {{% product-name %}} cluster URL: `https://{{< influxdb/host >}}` +7. **Product**: From the dropdown, select **InfluxDB Enterprise 3.x** +8. **Query Language**: Select **SQL** or **InfluxQL** + +### Configure database settings + +The fields in this section change based on your query language selection. {{< tabs-wrapper >}} {{% tabs %}} @@ -51,59 +70,26 @@ both SQL and InfluxQL. {{% tab-content %}} -When creating an InfluxDB data source that uses SQL to query data: - -1. Under **HTTP**: - - - **URL**: Provide your {{% product-name %}} URL: - - ``` - http://{{< influxdb/host >}} - ``` +When you select **SQL** as the query language, configure the following: - > [!Note] - > If you are _not_ using HTTPS, enable the **Insecure Connection** option - > under **InfluxDB Details**. +- **Database**: Your [database](/influxdb3/version/admin/databases/) name +- **Token**: A [database token](/influxdb3/version/admin/tokens/#database-tokens) with read access to the database -2. Under **InfluxDB Details**: - - - **Database**: Provide a default database name to query. - - **Token**: Provide an arbitrary, non-empty string. - - **Insecure Connection**: If _not_ using HTTPS, enable this option. - -3. Click **Save & test**. - - {{< img-hd src="/img/influxdb3/influxdb3-grafana-sql.png" alt="Grafana InfluxDB data source for InfluxDB 3 that uses SQL" />}} + {{< img-hd src="/img/influxdb3/enterprise-v3-grafana-product-dropdown-sql.png" alt="Grafana InfluxDB data source for InfluxDB 3 that uses SQL" />}} {{% /tab-content %}} {{% tab-content %}} -When creating an InfluxDB data source that uses InfluxQL to query data: - -1. Under **HTTP**: - - - **URL**: Provide your {{% product-name %}} URL: - - ``` - https://{{< influxdb/host >}} - ``` - -2. Under **InfluxDB Details**: - - - **Database**: Provide a default database name to query. - - **User**: Provide an arbitrary string. - _This credential is ignored when querying {{% product-name %}}, but it cannot be empty._ - - **Password**: Provide an arbitrary string. - - **HTTP Method**: Choose one of the available HTTP request methods to use when querying data: - - - **POST** ({{< req text="Recommended" >}}) - - **GET** +When you select **InfluxQL** as the query language, configure the following: -3. Click **Save & test**. +- **Database**: Your [database](/influxdb3/version/admin/databases/) name +- **User**: Enter a username. +- **Password**: A [database token](/influxdb3/version/admin/tokens/#database-tokens) with read access to the database +- **HTTP Method**: Select **POST** (recommended) or **GET** - {{< img-hd src="/img/influxdb3/influxdb3-grafana-influxql.png" alt="Grafana InfluxDB data source for InfluxDB 3 that uses InfluxQL" />}} + {{< img-hd src="/img/influxdb3/enterprise-v3-grafana-product-dropdown-influxql.png" alt="Grafana InfluxDB data source for InfluxDB 3 that uses InfluxQL" />}} {{% /tab-content %}} diff --git a/content/shared/v3-process-data/visualize/grafana.md b/content/shared/v3-process-data/visualize/grafana.md index c809b1c4dd..c590d29d2c 100644 --- a/content/shared/v3-process-data/visualize/grafana.md +++ b/content/shared/v3-process-data/visualize/grafana.md @@ -1,5 +1,5 @@ -Use [Grafana](https://grafana.com/) to query and visualize data stored in -{{% product-name %}}. +Use [Grafana](https://grafana.com/) or [Grafana Cloud](https://grafana.com/products/cloud/) +to query and visualize data from {{% product-name %}}. > [Grafana] enables you to query, visualize, alert on, and explore your metrics, > logs, and traces wherever they are stored. @@ -8,13 +8,14 @@ Use [Grafana](https://grafana.com/) to query and visualize data stored in > > {{% cite %}}-- [Grafana documentation](https://grafana.com/docs/grafana/latest/introduction/){{% /cite %}} -- [Install Grafana or login to Grafana Cloud](#install-grafana-or-login-to-grafana-cloud) +- [Install Grafana or log in to Grafana Cloud](#install-grafana-or-log-in-to-grafana-cloud) - [InfluxDB data source](#influxdb-data-source) +- [Before you begin](#before-you-begin) - [Create an InfluxDB data source](#create-an-influxdb-data-source) - [Query InfluxDB with Grafana](#query-influxdb-with-grafana) - [Build visualizations with Grafana](#build-visualizations-with-grafana) -## Install Grafana or login to Grafana Cloud +## Install Grafana or log in to Grafana Cloud If using the open source version of **Grafana**, follow the [Grafana installation instructions](https://grafana.com/docs/grafana/latest/setup-grafana/installation/) @@ -24,8 +25,8 @@ If using **Grafana Cloud**, log in to your Grafana Cloud instance. ## InfluxDB data source The InfluxDB data source plugin is included in the Grafana core distribution. -Use the plugin to query and visualize data stored in {{< product-name >}} with -both InfluxQL and SQL. +Use the plugin to query and visualize data from {{< product-name >}} with +both SQL and InfluxQL. > [!Note] > #### Grafana 10.3+ @@ -33,18 +34,41 @@ both InfluxQL and SQL. > The instructions below are for **Grafana 10.3+** which introduced the newest > version of the InfluxDB core plugin. > The updated plugin includes **SQL support** for InfluxDB 3-based products such -> as {{< product-name >}}. +> as {{< product-name >}}, and the interface dynamically adapts based on your product and query language selections. + +## Before you begin + +**Prerequisites:** +- Grafana 10.3 or later +- Administrator role in Grafana +- {{% show-in "cloud-serverless" %}}An [API token](/influxdb3/version/admin/tokens/) with read access to the bucket{{% /show-in %}}{{% show-in "cloud-dedicated, clustered" %}}A [database token](/influxdb3/version/admin/tokens/#database-tokens) with read access to the database{{% /show-in %}}{{% show-in "core,enterprise" %}}Your {{% token-link "admin" "database" %}} with read access to the database{{% /show-in %}} + +### Quick reference: {{< product-name >}} configuration + +| Configuration | Value | +|:------------- |:----- | +| **Product selection** | {{% hide-in "core,enterprise" %}}**{{% product-name %}}**{{% /hide-in %}}{{% show-in "core" %}}**InfluxDB Core 3.x**{{% /show-in %}}{{% show-in "enterprise" %}}**InfluxDB Enterprise 3.x**{{% /show-in %}} | +| **Default URL** | {{% show-in "core, enterprise" %}}`http://localhost:8181`{{% /show-in %}}{{% show-in "cloud-serverless, cloud-dedicated, clustered" %}}`https://{{< influxdb/host >}}`{{% /show-in %}} | +| **Query languages** | SQL (requires HTTP/2), InfluxQL | +| **Authentication** | {{% show-in "cloud-serverless" %}}Required (API token){{% /show-in %}}{{% show-in "core" %}}Optional (admin token){{% /show-in %}}{{% show-in "enterprise" %}}Optional (admin or database token){{% /show-in %}}{{% show-in "cloud-dedicated, clustered" %}}Required (database token){{% /show-in %}} | +| **Database/Bucket** | {{% show-in "cloud-serverless" %}}Bucket name{{% /show-in %}}{{% hide-in "cloud-serverless" %}}Database name{{% /hide-in %}} | ## Create an InfluxDB data source -Which data source you create depends on which query language you want to use to -query {{% product-name %}}: +1. In your Grafana interface, click **Connections** in the left sidebar. +2. Click **Data sources**. +3. Click **Add new data source**. +4. Search for and select **InfluxDB**. The InfluxDB data source configuration page displays. +5. In the **Settings** tab, configure the following: -1. In your Grafana user interface (UI), navigate to **Data Sources**. -2. Click **Add new data source**. -3. Search for and select the **InfluxDB** plugin. -4. Provide a name for your data source. -5. Under **Query Language**, select either **SQL** or **InfluxQL**: + - **Name**: Enter a descriptive name for your data source + - **URL**: Enter your {{% product-name %}}{{% show-in "cloud-dedicated, clustered" %}} cluster URL{{% /show-in %}}{{% show-in "cloud-serverless" %}} region URL{{% /show-in %}}{{% show-in "core, enterprise" %}} instance URL{{% /show-in %}}: `https://{{< influxdb/host >}}` + - **Product**: From the dropdown, select {{% hide-in "core,enterprise" %}}**{{% product-name %}}**{{% /hide-in %}}{{% show-in "core" %}}**InfluxDB Core 3.x**{{% /show-in %}}{{% show-in "enterprise" %}}**InfluxDB Enterprise 3.x**{{% /show-in %}} + - **Query Language**: Select **SQL** or **InfluxQL** + +### Configure database settings + +The fields in this section change based on your query language selection. {{< tabs-wrapper >}} {{% tabs %}} @@ -54,66 +78,65 @@ query {{% product-name %}}: {{% tab-content %}} -When creating an InfluxDB data source that uses SQL to query data: +#### SQL configuration -1. Under **HTTP**: +When you select **SQL** as the query language, configure the following fields: - - **URL**: Provide your {{% show-in "cloud-serverless" %}}[{{< product-name >}} region URL](/influxdb3/version/reference/regions/){{% /show-in %}} - {{% hide-in "cloud-serverless" %}}{{% product-name omit=" Clustered" %}} cluster URL{{% /hide-in %}} using the HTTPS protocol: +- **Database**: {{% show-in "cloud-serverless" %}}Your [bucket](/influxdb3/version/admin/buckets/) name. In {{< product-name >}}, buckets function as databases.{{% /show-in %}}{{% hide-in "cloud-serverless" %}}Your [database](/influxdb3/version/admin/databases/) name.{{% /hide-in %}} - ``` - https://{{< influxdb/host >}} - ``` -2. Under **InfluxDB Details**: +- **Token**: {{% show-in "cloud-serverless" %}}An [API token](/influxdb3/version/admin/tokens/) with read access to the bucket{{% /show-in %}}{{% show-in "cloud-dedicated, clustered" %}}A [database token](/influxdb3/version/admin/tokens/#database-tokens) with read access to the database{{% /show-in %}}{{% show-in "core, enterprise" %}}Your {{% token-link "admin" "database" %}} with read access to the database{{% /show-in %}} - - **Database**: Provide a default {{% show-in "cloud-serverless" %}}[bucket](/influxdb3/version/admin/buckets/) name to query. In {{< product-name >}}, a bucket functions as a database.{{% /show-in %}}{{% hide-in "cloud-serverless" %}}[database](/influxdb3/version/admin/databases/) name to query.{{% /hide-in %}} - - **Token**: Provide {{% show-in "cloud-serverless" %}}an [API token](/influxdb3/version/admin/tokens/) with read access to the buckets you want to query.{{% /show-in %}}{{% hide-in "cloud-serverless" %}}a [database token](/influxdb3/version/admin/tokens/#database-tokens) with read access to the databases you want to query.{{% /hide-in %}} -3. Click **Save & test**. +{{% show-in "cloud-serverless" %}}{{< img-hd src="/img/influxdb3/cloud-serverless-grafana-product-dropdown-sql.png" alt="SQL configuration for {{% product-name %}}" />}}{{% /show-in %}} +{{% show-in "cloud-dedicated" %}}{{< img-hd src="/img/influxdb3/cloud-dedicated-grafana-product-dropdown-sql.png" alt="SQL configuration for {{% product-name %}}" />}}{{% /show-in %}} +{{% show-in "clustered" %}}{{< img-hd src="/img/influxdb3/cluster-grafana-product-dropdown-sql.png" alt="SQL configuration for {{% product-name %}}" />}}{{% /show-in %}} +{{% show-in "core, enterprise" %}}{{< img-hd src="/img/influxdb3/enterprise-v3-grafana-product-dropdown-sql.png" alt="SQL configuration for {{% product-name %}}" />}}{{% /show-in %}} + +> [!Important] +> #### Grafana queries through a proxy require HTTP/2 +> +> For SQL queries, Grafana uses the Flight SQL protocol (gRPC) to query {{% product-name %}}, which requires **HTTP/2**. +> If you query {{% product-name %}} through a proxy (such as HAProxy, nginx, or a load balancer), +> verify that your proxy is configured to support HTTP/2. +> Without HTTP/2 support, SQL queries through Grafana will fail to connect. +> +> InfluxQL queries use HTTP/1.1 and are not affected by this requirement. -{{% show-in "cloud-serverless" %}}{{< img-hd src="/img/influxdb3/cloud-serverless-grafana-influxdb-data-source-sql.png" alt="Grafana InfluxDB data source for InfluxDB Cloud Serverless that uses SQL" />}}{{% /show-in %}} -{{% show-in "cloud-dedicated" %}}{{< img-hd src="/img/influxdb/cloud-dedicated-grafana-influxdb-data-source-sql.png" alt="Grafana InfluxDB data source for InfluxDB Cloud Dedicated that uses SQL" />}}{{% /show-in %}} -{{% show-in "clustered" %}}{{< img-hd src="/img/influxdb3/clustered-grafana-influxdb-data-source-sql.png" alt="Grafana InfluxDB data source for InfluxDB Clustered that uses SQL" />}}{{% /show-in %}} +Click **Save & test**. Grafana attempts to connect to {{% product-name %}} and returns the result of the test. {{% /tab-content %}} {{% tab-content %}} -When creating an InfluxDB data source that uses InfluxQL to query data: +#### InfluxQL configuration {{% show-in "cloud-serverless" %}} -> [!Note] -> #### Map databases and retention policies to buckets -> -> To query {{% product-name %}} with InfluxQL, first map database and retention policy -> (DBRP) combinations to your InfluxDB Cloud buckets. For more information, see -> [Map databases and retention policies to buckets](/influxdb3/version/query-data/influxql/dbrp/). +> [!Important] +> #### DBRP mapping required +> +> To query {{% product-name %}} with InfluxQL, you must first map database and +> retention policy (DBRP) combinations to your InfluxDB Cloud buckets. The +> configuration form displays a warning if DBRP mapping is not configured. +> +> For more information, see [Map databases and retention policies to buckets](/influxdb3/version/query-data/influxql/dbrp/). {{% /show-in %}} -1. Under **HTTP**: +When you select **InfluxQL** as the query language, configure the following fields: + +- **Database**: {{% show-in "cloud-serverless" %}}The database name mapped to your InfluxDB bucket.{{% /show-in %}}{{% hide-in "cloud-serverless" %}}Your [database](/influxdb3/version/admin/databases/) name.{{% /hide-in %}} - - **URL**: Provide your {{% show-in "cloud-serverless" %}}[{{< product-name >}} region URL](/influxdb3/version/reference/regions/){{% /show-in %}}{{% hide-in "cloud-serverless" %}}{{% product-name omit=" Clustered" %}} cluster URL{{% /hide-in %}} - using the HTTPS protocol: +- **User**: Enter a username (can be any non-empty value). - ``` - https://{{< influxdb/host >}} - ``` -2. Under **InfluxDB Details**: +- **Password**: {{% show-in "cloud-serverless" %}}Your [API token](/influxdb3/version/admin/tokens/) with read access to the bucket.{{% /show-in %}}{{% hide-in "cloud-serverless" %}}Your [database token](/influxdb3/version/admin/tokens/#database-tokens) with read access to the database.{{% /hide-in %}} - - **Database**: Provide a {{% show-in "cloud-serverless" %}}database name to query. - Use the database name that is mapped to your InfluxDB bucket{{% /show-in %}}{{% hide-in "cloud-serverless" %}}default [database](/influxdb3/version/admin/databases/) name to query{{% /hide-in %}}. - - **User**: Provide an arbitrary string. - _This credential is ignored when querying {{% product-name %}}, but it cannot be empty._ - - **Password**: Provide {{% show-in "cloud-serverless" %}}an [API token](/influxdb3/version/admin/tokens/) with read access to the buckets you want to query{{% /show-in %}}{{% hide-in "cloud-serverless" %}}a [database token](/influxdb3/version/admin/tokens/#database-tokens) with read access to the databases you want to query{{% /hide-in %}}. - - **HTTP Method**: Choose one of the available HTTP request methods to use when querying data: +- **HTTP Method**: Select **POST** (recommended) or **GET** - - **POST** ({{< req text="Recommended" >}}) - - **GET** -3. Click **Save & test**. +{{% show-in "cloud-serverless" %}}{{< img-hd src="/img/influxdb3/cloud-serverless-grafana-product-dropdown-influxql.png" alt="InfluxQL configuration for {{% product-name %}} with DBRP warning" />}}{{% /show-in %}} +{{% show-in "cloud-dedicated" %}}{{< img-hd src="/img/influxdb3/cloud-dedicated-grafana-product-dropdown-influxql.png" alt="InfluxQL configuration for {{% product-name %}} with DBRP warning" />}}{{% /show-in %}} +{{% show-in "clustered" %}}{{< img-hd src="/img/influxdb3/cluster-grafana-product-dropdown-influxql.png" alt="InfluxQL configuration for {{% product-name %}} with DBRP warning" />}}{{% /show-in %}} +{{% show-in "core, enterprise" %}}{{< img-hd src="/img/influxdb3/enterprise-v3-grafana-product-dropdown-influxql.png" alt="InfluxQL configuration for {{% product-name %}} with DBRP warning" />}}{{% /show-in %}} -{{% show-in "cloud-dedicated" %}}{{< img-hd src="/img/influxdb/cloud-dedicated-grafana-influxdb-data-source-influxql.png" alt="Grafana InfluxDB data source for InfluxDB Cloud Dedicated using InfluxQL" />}}{{% /show-in %}} -{{% show-in "cloud-serverless" %}}{{< img-hd src="/img/influxdb3/cloud-serverless-grafana-influxdb-data-source-influxql.png" alt="Grafana InfluxDB data source for InfluxDB Cloud Serverless using InfluxQL" />}}{{% /show-in %}} -{{% show-in "clustered" %}}{{< img-hd src="/img/influxdb3/clustered-grafana-influxdb-data-source-influxql.png" alt="Grafana InfluxDB data source for InfluxDB Clustered using InfluxQL" />}}{{% /show-in %}} +Click **Save & test**. Grafana attempts to connect to {{% product-name %}} and returns the result of the test. {{% /tab-content %}} @@ -122,7 +145,7 @@ When creating an InfluxDB data source that uses InfluxQL to query data: ## Query InfluxDB with Grafana After you [configure and save an InfluxDB datasource](#create-an-influxdb-data-source), -use Grafana to build, run, and inspect queries against your InfluxDB {{% show-in "cloud-serverless" %}}bucket{{% /show-in %}}{{% hide-in "cloud-serverless" %}}database{{% /hide-in %}}. +use Grafana to build, run, and inspect queries against {{% show-in "cloud-serverless" %}}your InfluxDB bucket{{% /show-in %}}{{% hide-in "cloud-serverless" %}}{{% product-name %}}{{% /hide-in %}}. {{< tabs-wrapper >}} {{% tabs %}} @@ -139,12 +162,12 @@ use Grafana to build, run, and inspect queries against your InfluxDB {{% show-in 1. Click **Explore**. 2. In the dropdown, select the saved InfluxDB data source to query. 3. Use the SQL query form to build your query: - - **Table**: Select the measurement to query. + - **Table**: Select the table (measurement) to query. - **Column**: Select one or more fields and tags to return as columns in query results. - + With SQL, select the `time` column to include timestamps with the data. Grafana relies on the `time` column to correctly graph time series data. - + - _**Optional:**_ Toggle **filter** to generate **WHERE** clause statements. - **WHERE**: Configure condition expressions to include in the `WHERE` clause. diff --git a/static/img/influxdb/OSS-v1-grafana-product-dropdown-flux.png b/static/img/influxdb/OSS-v1-grafana-product-dropdown-flux.png new file mode 100644 index 0000000000..3b20ffbaeb Binary files /dev/null and b/static/img/influxdb/OSS-v1-grafana-product-dropdown-flux.png differ diff --git a/static/img/influxdb/OSS-v1-grafana-product-dropdown-influxql.png b/static/img/influxdb/OSS-v1-grafana-product-dropdown-influxql.png new file mode 100644 index 0000000000..87b3de6d4f Binary files /dev/null and b/static/img/influxdb/OSS-v1-grafana-product-dropdown-influxql.png differ diff --git a/static/img/influxdb/OSS-v2-grafana-product-dropdown-flux.png b/static/img/influxdb/OSS-v2-grafana-product-dropdown-flux.png new file mode 100644 index 0000000000..5560b95577 Binary files /dev/null and b/static/img/influxdb/OSS-v2-grafana-product-dropdown-flux.png differ diff --git a/static/img/influxdb/OSS-v2-grafana-product-dropdown-influxql.png b/static/img/influxdb/OSS-v2-grafana-product-dropdown-influxql.png new file mode 100644 index 0000000000..f4495facac Binary files /dev/null and b/static/img/influxdb/OSS-v2-grafana-product-dropdown-influxql.png differ diff --git a/static/img/influxdb/enterprise-v1-grafana-product-dropdown-flux.png b/static/img/influxdb/enterprise-v1-grafana-product-dropdown-flux.png new file mode 100644 index 0000000000..87fa395013 Binary files /dev/null and b/static/img/influxdb/enterprise-v1-grafana-product-dropdown-flux.png differ diff --git a/static/img/influxdb/enterprise-v1-grafana-product-dropdown-influxql.png b/static/img/influxdb/enterprise-v1-grafana-product-dropdown-influxql.png new file mode 100644 index 0000000000..c48ccafd1e Binary files /dev/null and b/static/img/influxdb/enterprise-v1-grafana-product-dropdown-influxql.png differ diff --git a/static/img/influxdb/influxdb-v2-cloud-influxql.png b/static/img/influxdb/influxdb-v2-cloud-influxql.png new file mode 100644 index 0000000000..5ec83445f4 Binary files /dev/null and b/static/img/influxdb/influxdb-v2-cloud-influxql.png differ diff --git a/static/img/influxdb3/cloud-dedicated-grafana-product-dropdown-influxql.png b/static/img/influxdb3/cloud-dedicated-grafana-product-dropdown-influxql.png new file mode 100644 index 0000000000..4114e4c1fa Binary files /dev/null and b/static/img/influxdb3/cloud-dedicated-grafana-product-dropdown-influxql.png differ diff --git a/static/img/influxdb3/cloud-dedicated-grafana-product-dropdown-sql.png b/static/img/influxdb3/cloud-dedicated-grafana-product-dropdown-sql.png new file mode 100644 index 0000000000..4460ee1271 Binary files /dev/null and b/static/img/influxdb3/cloud-dedicated-grafana-product-dropdown-sql.png differ diff --git a/static/img/influxdb3/cloud-serverless-grafana-product-dropdown-flux.png b/static/img/influxdb3/cloud-serverless-grafana-product-dropdown-flux.png new file mode 100644 index 0000000000..ecd8e3776e Binary files /dev/null and b/static/img/influxdb3/cloud-serverless-grafana-product-dropdown-flux.png differ diff --git a/static/img/influxdb3/cloud-serverless-grafana-product-dropdown-influxql.png b/static/img/influxdb3/cloud-serverless-grafana-product-dropdown-influxql.png new file mode 100644 index 0000000000..63a0fa7439 Binary files /dev/null and b/static/img/influxdb3/cloud-serverless-grafana-product-dropdown-influxql.png differ diff --git a/static/img/influxdb3/cloud-serverless-grafana-product-dropdown-sql.png b/static/img/influxdb3/cloud-serverless-grafana-product-dropdown-sql.png new file mode 100644 index 0000000000..9ed3c02e8f Binary files /dev/null and b/static/img/influxdb3/cloud-serverless-grafana-product-dropdown-sql.png differ diff --git a/static/img/influxdb3/cluster-grafana-product-dropdown-influxql.png b/static/img/influxdb3/cluster-grafana-product-dropdown-influxql.png new file mode 100644 index 0000000000..b7b80cc3f4 Binary files /dev/null and b/static/img/influxdb3/cluster-grafana-product-dropdown-influxql.png differ diff --git a/static/img/influxdb3/cluster-grafana-product-dropdown-sql.png b/static/img/influxdb3/cluster-grafana-product-dropdown-sql.png new file mode 100644 index 0000000000..e87bb3a6d0 Binary files /dev/null and b/static/img/influxdb3/cluster-grafana-product-dropdown-sql.png differ diff --git a/static/img/influxdb3/enterprise-v3-grafana-product-dropdown-influxql.png b/static/img/influxdb3/enterprise-v3-grafana-product-dropdown-influxql.png new file mode 100644 index 0000000000..37067f201f Binary files /dev/null and b/static/img/influxdb3/enterprise-v3-grafana-product-dropdown-influxql.png differ diff --git a/static/img/influxdb3/enterprise-v3-grafana-product-dropdown-sql.png b/static/img/influxdb3/enterprise-v3-grafana-product-dropdown-sql.png new file mode 100644 index 0000000000..5f5a2b60c3 Binary files /dev/null and b/static/img/influxdb3/enterprise-v3-grafana-product-dropdown-sql.png differ diff --git a/static/img/influxdb3/general-grafana-add-datasource-selection.png b/static/img/influxdb3/general-grafana-add-datasource-selection.png new file mode 100644 index 0000000000..43a1c18b7f Binary files /dev/null and b/static/img/influxdb3/general-grafana-add-datasource-selection.png differ diff --git a/static/img/influxdb3/general-grafana-configuration-connection.png b/static/img/influxdb3/general-grafana-configuration-connection.png new file mode 100644 index 0000000000..f66f09f4e9 Binary files /dev/null and b/static/img/influxdb3/general-grafana-configuration-connection.png differ diff --git a/static/img/influxdb3/general-grafana-product-dropdown.png b/static/img/influxdb3/general-grafana-product-dropdown.png new file mode 100644 index 0000000000..8fc1e5ee32 Binary files /dev/null and b/static/img/influxdb3/general-grafana-product-dropdown.png differ