Documentation

Use Grafana with InfluxDB

This page documents an earlier version of InfluxDB OSS. InfluxDB OSS v2 is the latest stable version. See the equivalent InfluxDB v2 documentation: Use Grafana with InfluxDB OSS.

Use Grafana or Grafana Cloud to visualize data from your InfluxDB v1.8 instance.

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.
  1. Start InfluxDB.

  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, 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 1.8 (InfluxQL or Flux):

    SQL is only supported in InfluxDB v3.

Configure Grafana to use InfluxQL

With InfluxQL selected as the query language in your InfluxDB data source settings:

  1. Under HTTP, enter the following:

    • URL: Your InfluxDB URL.

      http://localhost:8086
      
  2. Under InfluxDB Details, enter the following:

  3. Provide a Min time interval (default is 10s).

  4. Click Save & Test. Grafana attempts to connect to InfluxDB and returns the result of the test.

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 in InfluxDB.

  2. Under HTTP, enter the following:

    • URL: Your InfluxDB URL.

      http://localhost:8086
      
  3. 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.

  4. Click Save & Test. Grafana attempts to connect to InfluxDB and returns the result of the test.


Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB v3 enhancements and InfluxDB Clustered is now generally available

New capabilities, including faster query performance and management tooling advance the InfluxDB v3 product line. InfluxDB Clustered is now generally available.

InfluxDB v3 performance and features

The InfluxDB v3 product line has seen significant enhancements in query performance and has made new management tooling available. These enhancements include an operational dashboard to monitor the health of your InfluxDB cluster, single sign-on (SSO) support in InfluxDB Cloud Dedicated, and new management APIs for tokens and databases.

Learn about the new v3 enhancements


InfluxDB Clustered general availability

InfluxDB Clustered is now generally available and gives you the power of InfluxDB v3 in your self-managed stack.

Talk to us about InfluxDB Clustered