Documentation

Use Grafana to visualize data

Use Grafana to query and visualize data stored in an InfluxDB bucket backed by InfluxDB IOx.

[Grafana] enables you to query, visualize, alert on, and explore your metrics, logs, and traces wherever they are stored. [Grafana] provides you with tools to turn your time-series database (TSDB) data into insightful graphs and visualizations.

For the most performant queries, use SQL and the Flight SQL protocol to query InfluxDB.

Download the FlightSQL Plugin

The Grafana FlightSQL plugin is experimental and is subject to change.

curl -L https://github.com/influxdata/grafana-flightsql-datasource/releases/download/v0.1.5/influxdata-flightsql-datasource-0.1.5.zip \
  -o influxdata-flightsql-datasource-0.1.5.zip

Install the Grafana FlightSQL plugin

Install the custom-built FlightSQL plugin in a local or Docker-based instance of Grafana OSS or Grafana Enterprise.

Grafana Cloud does not support custom plugins

Only plugins that are uploaded publicly to the Grafana Plugins repo that include the ability to use “click to install” from the site can be added to your Grafana Cloud instance. Private, custom-built, or third-party plugins that require manual uploading or manually modifying Grafana backend files cannot be installed on or used with Grafana Cloud.

  1. Unzip the FlightSQL plugin archive to your Grafana custom plugin directory. The custom plugin directory can exist anywhere in your filesystem as long as the Grafana process can access it.

    unzip influxdata-flightsql-datasource-0.1.5.zip -d /path/to/grafana-plugins/
    
  2. Edit your Grafana configuration.

    Configure Grafana using configuration file or environment variable. For information about where to find your Grafana configuration file or what environment variables are available, see the Configure Grafana documentation.

    1. Point Grafana to your custom plugin directory. Do one of the following:

      • Edit the paths.plugins directive in your Grafana configuration file to point to the path of your custom plugins directory:

        [paths]
        plugins = /path/to/grafana-plugins/
        
      • Set the GF_PATHS_PLUGINS environment variable to point to the path of your custom plugins directory:

        GF_PATHS_PLUGINS=/path/to/grafana-plugins/
        
    2. Allow Grafana to load unsigned plugins. The FlightSQL plugin is unsigned and cannot be loaded by default. Do one of the following:

      • Edit the plugins.allow_loading_unsigned_plugins directive in your Grafana configuration file to allow the influxdata-flightsql-datasource:

        [plugins]
        allow_loading_unsigned_plugins = influxdata-flightsql-datasource
        
      • Set the GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS environment variable to influxdata-flightsql-datasource:

        GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=influxdata-flightsql-datasource
        
  3. Restart Grafana to apply the configuration changes.

Unzip the FlightSQL plugin archive to your Grafana custom plugin directory. The custom plugin directory can exist anywhere in your filesystem as long as the Grafana process can access it.

```sh
unzip influxdata-flightsql-datasource-0.1.2.zip
```

To add the FlightSQL plugin to your pre-existing Grafana Docker deployment mount the plugin directory, influxdata-flightsql-datasource, as a volume to your Grafana container:

Docker Run

docker run \
  --volume $PWD/influxdata-flightsql-datasource:/var/lib/grafana/plugins/influxdata-flightsql-datasource \
  --publish 3000:3000 \
  --name grafana \
  --env GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=influxdata-flightsql-datasource \
  grafana/grafana:latest
Docker-Compose
version: '3'
services:
  grafana:
    image: grafana/grafana:latest
    ports:
      - 3000:3000
    environment:
      - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=influxdata-flightsql-datasource
    volumes: 
      - ./influxdata-flightsql-datasource:/var/lib/grafana/plugins/influxdata-flightsql-datasource
    restart: always

It’s important to set the GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS environment variable. The FlightSQL plugin is unsigned and Grafana requires you to explicitly load unsigned plugins.

Configure the Flight SQL datasource

  1. In your Grafana user interface (UI), navigate to Data Sources.

  2. Click Add data source.

  3. Search for and select the FlightSQL plugin. 4 Provide a name for your datasource.

  4. Add your connection credentials:

    • Host: Provide the host and port of your Flight SQL client. For InfluxDB Cloud, this is your InfluxDB Cloud region domain and port 443. For example:

      us-east-1-1.aws.cloud2.influxdata.com:443
      
    • AuthType: Select token.

    • Token: Provide your InfluxDB API token with read access to the buckets you want to query.

    • Require TLS/SSL: Enable this toggle.

  5. Add connection MetaData. Provide optional key, value pairs to send to your Flight SQL client.

    InfluxDB Cloud requires your bucket name or bucket-id:

    • Key: bucket-name or bucket-id
    • Value: Bucket name or bucket ID
  6. Select Save & Test.

    Grafana FlightSQL datasource
  7. Click Explore to begin exploring your schema and querying InfluxDB with SQL.

Build visualizations with Grafana

For a comprehensive walk-through of creating visualizations with Grafana, see the Grafana documentation.


Was this page helpful?

Thank you for your feedback!


Linux Package Signing Key Rotation

All signed InfluxData Linux packages have been resigned with an updated key. If using Linux, you may need to update your package configuration to continue to download and verify InfluxData software packages.

For more information, see the Linux Package Signing Key Rotation blog post.

InfluxDB Cloud backed by InfluxDB IOx

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by IOx, this is the correct documentation.

If powered by TSM, see the TSM-based InfluxDB Cloud documentation.

InfluxDB Cloud backed by InfluxDB TSM

All InfluxDB Cloud organizations created on or after January 31, 2023 are backed by the new InfluxDB IOx storage engine which enables nearly unlimited series cardinality and SQL query support. Check the right column of your InfluxDB Cloud organization homepage to see which InfluxDB storage engine you’re using.

If powered by TSM, this is the correct documentation.

If powered by IOx, see the IOx-based InfluxDB Cloud documentation.

State of the InfluxDB Cloud (IOx) documentation

The new documentation for InfluxDB Cloud backed by InfluxDB IOx is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.