---
title: Use Grafana with InfluxDB
description: Configure Grafana to query and visualize data from InfluxDB v1.x.
url: https://docs.influxdata.com/influxdb/v1/tools/grafana/
estimated_tokens: 1847
product: InfluxDB OSS v1
version: v1
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb/v1/tools/grafana/
date: '2026-01-26T18:42:09-06:00'
lastmod: '2026-01-26T18:42:09-06:00'
---

This page documents an earlier version of InfluxDB OSS.[InfluxDB 3 Core](/influxdb3/core/) is the latest stable version.

Use [Grafana](https://grafana.com/) or [Grafana Cloud](https://grafana.com/products/cloud/)to visualize data from your InfluxDB instance.

> [!Note]
> #### Identify your InfluxDB version
>
> If you are unsure which InfluxDB product you are using, use our interactive version detector to help identify it:
>
> [Detect my InfluxDB version](#)
> *(Interactive feature in HTML: Opens version detector modal)*

> [!Note]
> #### Grafana 12.2+
>
> The instructions below are for **Grafana 12.2+** with the `newInfluxDSConfigPageDesign`feature flag enabled. This introduces the newest version of the InfluxDB core plugin.
> The updated plugin includes **SQL support** for InfluxDB 3-based products such
> as InfluxDB, and the interface dynamically adapts based on your
> product and query language selection in [URL and authentication](#configure-url-and-authentication).

> [!Note]
> #### Required
>
> * The instructions below are for **Grafana 12.2+** with the `newInfluxDSConfigPageDesign`feature flag enabled. This introduces the newest version of the InfluxDB core plugin.
> 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.

* [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](/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. If running Grafana locally, enable the `newInfluxDSConfigPageDesign` feature flag to use the latest InfluxDB data source plugin.

   [](#option-1-configuration-file-recommended)

   Option 1: Configuration file (recommended)

   Add the following to your `grafana.ini` configuration file:

   ```
   [feature_toggles]
   enable = newInfluxDSConfigPageDesign
   ```

   Configuration file locations:

   * **Linux**: `/etc/grafana/grafana.ini`
   * **macOS (Homebrew)**: `/opt/homebrew/etc/grafana/grafana.ini`
   * **Windows**: `<GRAFANA_INSTALL_DIR>\conf\grafana.ini`

   [](#option-2-command-line)

   Option 2: Command line

   Enable the feature flag when starting Grafana:

   [Linux](#linux)[macOS (Homebrew)](#macos-homebrew)[Windows](#windows)

   ```
   grafana-server --config /etc/grafana/grafana.ini \
     cfg:default.feature_toggles.enable=newInfluxDSConfigPageDesign
   ```

   ```
   /opt/homebrew/opt/grafana/bin/grafana server \
     --config /opt/homebrew/etc/grafana/grafana.ini \
     --homepath /opt/homebrew/opt/grafana/share/grafana \
     --packaging=brew \
     cfg:default.paths.logs=/opt/homebrew/var/log/grafana \
     cfg:default.paths.data=/opt/homebrew/var/lib/grafana \
     cfg:default.paths.plugins=/opt/homebrew/var/lib/grafana/plugins \
     cfg:default.feature_toggles.enable=newInfluxDSConfigPageDesign
   ```

   ```
   grafana-server.exe --config <GRAFANA_INSTALL_DIR>\conf\grafana.ini `
     cfg:default.feature_toggles.enable=newInfluxDSConfigPageDesign
   ```

   For more information, see [Configure feature toggles](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles/) in the Grafana documentation.

4. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally,[start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit[http://localhost:3000](http://localhost:3000) in your browser.

> [!Note]
> #### Using Grafana Cloud with a local InfluxDB instance
>
> If you need to keep your database local, consider running Grafana locally instead of using Grafana Cloud,
> as this avoids the need to expose your database to the internet.
>
> To use InfluxDB running on your private network with Grafana Cloud, you must configure a[private data source for Grafana Cloud](https://grafana.com/docs/grafana-cloud/data-sources/private-data-sources/).

> [!Note]
> SQL is only supported in InfluxDB 3.
> For more information, see how to [get started with InfluxDB 3 Core](/influxdb3/core/get-started/).

## Create an InfluxDB data source

1. In your Grafana interface, click **Connections** in the left sidebar.
2. Click **Data sources**.
3. Click **Add new connection**.
4. Search for and select **InfluxDB**. The InfluxDB data source configuration page displays.
5. In the **Settings** tab, enter a **Name** for your data source.

### Configure URL and authentication

In the **URL and authentication** section, configure the following:

* **URL**: Your server URL–for example, `https://localhost:8086`
* **Product**: From the dropdown, select **InfluxDB OSS 1.x**
* **Query Language**: Select **InfluxQL** or **Flux**
* *(Optional)* **Advanced HTTP Settings**, **Auth**, and **TLS/SSL Settings** as needed for your environment

### Configure database settings

The fields in this section change based on your query language selection in [URL and authentication](#configure-url-and-authentication).

[InfluxQL](#influxql)[Flux](#flux)

## Configure Grafana to use InfluxQL

When you select **InfluxQL** as the query language, configure the following:

* **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.*

![InfluxQL configuration for InfluxDB OSS 1.x](/img/influxdb3/OSS-v1-grafana-product-dropdown-influxql.png)

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

## Configure Grafana to use Flux

When you select **Flux** as the query language, configure the following:

1. Ensure [Flux is enabled](/influxdb/v1/flux/installation/) in your InfluxDB configuration file.

2. Configure the database settings:

   * **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

![Flux configuration for InfluxDB OSS 1.x](/img/influxdb3/OSS-v1-grafana-product-dropdown-flux.png)

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

## Query and visualize data

With your InfluxDB connection configured, use Grafana to query and visualize time series data.

### Query inspection in Grafana

To learn about query management and inspection in Grafana, see the[Grafana Explore documentation](https://grafana.com/docs/grafana/latest/explore/).

### Build visualizations with Grafana

For a comprehensive walk-through of creating visualizations with
Grafana, see the [Grafana documentation](https://grafana.com/docs/grafana/latest/).

#### Related

* [Get started with Flux](/flux/v0/get-started/)
