Documentation

Use Grafana with InfluxDB

Use Grafana or Grafana Cloud to visualize data from InfluxDB 2.0 and InfluxDB Cloud.

The instructions in this guide require Grafana Cloud or Grafana v7.1+.

  1. Sign up for InfluxDB Cloud 2.0 or start InfluxDB 2.0 OSS.
  2. Sign up for Grafana Cloud or download and install Grafana.
  3. Visit your Grafana Cloud user interface (UI) or, if running Grafana locally, start Grafana and visit http://localhost:3000 in your browser.
  4. In the left navigation of the Grafana UI, hover over the gear icon to expand the Configuration section. Click Data Sources.
  5. Click Add data source.
  6. Select InfluxDB from the list of available data sources.
  7. On the Data Source configuration page, enter a name for your InfluxDB data source.
  8. Under Query Language, select one of the following:

Configure Grafana to use Flux

With Flux selected as the query language in your InfluxDB data source, configure your InfluxDB connection:

  1. Under Connection, enter the following:

  2. Click Save & Test. Grafana attempts to connect to the InfluxDB 2.0 datasource and returns the results of the test.

Configure Grafana to use InfluxQL

InfluxDB Cloud supports InfluxQL, but InfluxDB 2.0 OSS does not.

With InfluxQL selected as the query language in your InfluxDB data source, configure your InfluxDB connection:

  1. Under HTTP, enter the following:

    • URL: Your InfluxDB URL.

      https://cloud2.influxdata.com
    • Access: Server (default)

  2. Under Auth, enable Basic Auth.

  3. Under Basic Auth Details, provide your InfluxDB authentication credentials:

  4. Under InfluxDB details, set the following:

  5. Click Save & Test. Grafana attempts to connect to the InfluxDB 2.0 datasource and returns the results of the test.

Query and visualize data

With your InfluxDB connection configured, use Grafana and Flux to query and visualize time series data stored in InfluxDB 2.0 or InfluxDB Cloud 2.0.

For more information about using Grafana, see the Grafana documentation. If you’re just learning Flux, see Get started with Flux.


New! Cloud or OSS?