5.0 KiB
title | seotitle | description | menu | canonical | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Use Grafana with InfluxDB Enterprise | Use Grafana with InfluxDB Enterprise v1.8 | Configure Grafana to query and visualize data from InfluxDB Enterprise v1.8. |
|
/influxdb/v2/tools/grafana/ |
Use Grafana or Grafana 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.
- To use Flux, use InfluxDB 1.8.1+ and enable Flux in your InfluxDB configuration file. {{% /note %}}
-
Visit your Grafana Cloud user interface (UI) or, if running Grafana locally, start Grafana and visit http://localhost:3000 in your browser.
-
In the left navigation of the Grafana UI, expand the Connections section and click Add new connection.
-
Select InfluxDB from the list of available data sources and click Add data source.
-
On the Data Source configuration page, enter a name for your InfluxDB data source.
-
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 %}}
{{< tabs-wrapper >}}
{{% tabs %}}
InfluxQL
Flux
{{% /tabs %}}
{{% tab-content %}}
Configure Grafana to use InfluxQL
With InfluxQL selected as the query language in your InfluxDB data source settings:
-
Under HTTP, enter the following:
-
URL: Your InfluxDB Enterprise URL or load balancer URL.
http://localhost:8086
-
-
Under InfluxDB Details, enter the following:
- Database: your database name
- User: your InfluxDB username (if authentication is enabled)
- Password: your InfluxDB password (if authentication is enabled)
- HTTP Method: Select GET or POST (for differences between the two, see the query HTTP endpoint documentation)
-
Provide a Min time interval (default is 10s).
{{< img-hd src="/img/influxdb/v1-tools-grafana-influxql.png" />}}
-
Click Save & Test. Grafana attempts to connect to InfluxDB and returns the result of the test.
{{% /tab-content %}}
{{% tab-content %}}
Configure Grafana to use Flux
With Flux selected as the query language in your InfluxDB data source, configure your InfluxDB connection:
-
Ensure Flux is enabled in your InfluxDB Enterprise data nodes.
-
Under HTTP, enter the following:
-
URL: Your InfluxDB Enterprise URL or load balancer URL.
http://localhost:8086
-
-
Under InfluxDB Details, enter the following:
-
Organization: Provide an arbitrary value.
-
Token: If InfluxDB authentication is enabled, provide your InfluxDB username and password using the following syntax:
# Syntax username:password # Example johndoe:mY5uP3rS3crE7pA5Sw0Rd
If authentication is not enabled, leave blank.
-
Default Bucket: Provide a default database and retention policy combination using the following syntax:
# Syntax database-name/retention-policy-name # Examples example-db/example-rp telegraf/autogen
-
Min time interval: Grafana minimum time interval.
{{< 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. {{% /tab-content %}}
{{< /tabs-wrapper >}}