# InfluxDB2 QL Datasource

**URL:** <https://community.grafana.com/t/influxdb2-ql-datasource/101394>\
**Category:** Grafana\
**Tags:** influxdb\
**Created:** [August 17, 2023, 9:13am UTC](https://community.grafana.com/t/influxdb2-ql-datasource/101394 "2023-08-17T09:13:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![massaro](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@massaro](https://community.grafana.com/u/massaro)\
**Post date:** [August 17, 2023, 9:13am UTC](https://community.grafana.com/t/influxdb2-ql-datasource/101394/1 "2023-08-17T09:13:54Z")

</div>

I would like to setup a datasource for influxDB2 using the QL language.  
I have not found clear instructions anywhere about this but several confirmations that it is possible.  
Looks like a well kept secret!  
I would appreciate som help to set it up.  
Thank you for supporting

---

<div class="post-metadata">

**Author:** ![grant2](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/grant2/32/42281_2.png) [@grant2](https://community.grafana.com/u/grant2)\
**Post date:** [August 17, 2023, 9:18am UTC](https://community.grafana.com/t/influxdb2-ql-datasource/101394/2 "2023-08-17T09:18:35Z")

</div>

There are currently 3 languages for InfluxDB:

1. InfluxQL
2. Flux
3. SQL

Which version of InfluxDB do you plan to install? Please be specific as the version and type (Cloud or OSS) will dictate which of the 3 languages you can use.

---

<div class="post-metadata">

**Author:** ![massaro](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@massaro](https://community.grafana.com/u/massaro)\
**Post date:** [August 17, 2023, 9:25am UTC](https://community.grafana.com/t/influxdb2-ql-datasource/101394/3 "2023-08-17T09:25:38Z")

</div>

The InfluxDB2 version I have installed is OSS  
InfluxDB v2.7.1Server: `407fa62` Frontend: `9d25a2f`

I would like to setup a data source in Grafana with the influxQL which is the same I use in influx 1.x

Thank you

---

<div class="post-metadata">

**Author:** ![grant2](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/grant2/32/42281_2.png) [@grant2](https://community.grafana.com/u/grant2)\
**Post date:** [August 17, 2023, 9:32am UTC](https://community.grafana.com/t/influxdb2-ql-datasource/101394/4 "2023-08-17T09:32:35Z")

</div>

For v2.7, looks like you can continue using InfluxQL. See instructions [here](https://docs.influxdata.com/influxdb/v2.7/query-data/influxql/).

In Grafana, you have to select InfluxQL when setting up the datasource:

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/4/6/46a2505a219089b4d3cba7ce4b82de4cecc60798.png)

---

<div class="post-metadata">

**Author:** ![massaro](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@massaro](https://community.grafana.com/u/massaro)\
**Post date:** [August 17, 2023, 10:01am UTC](https://community.grafana.com/t/influxdb2-ql-datasource/101394/5 "2023-08-17T10:01:04Z")

</div>

That link doesn’t explain how to setup the datasource in Grafana with InfluxQL for influxDB2.

---

<div class="post-metadata">

**Author:** ![grant2](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/grant2/32/42281_2.png) [@grant2](https://community.grafana.com/u/grant2)\
**Post date:** [August 17, 2023, 11:22am UTC](https://community.grafana.com/t/influxdb2-ql-datasource/101394/6 "2023-08-17T11:22:44Z")

</div>

How about this?

> **[InfluxDB data source | Grafana documentation](https://grafana.com/docs/grafana/latest/datasources/influxdb/)**
>
> Guide for using InfluxDB in Grafana

---

<div class="post-metadata">

**Author:** ![massaro](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@massaro](https://community.grafana.com/u/massaro)\
**Post date:** [August 17, 2023, 11:30am UTC](https://community.grafana.com/t/influxdb2-ql-datasource/101394/7 "2023-08-17T11:30:26Z")

</div>

I saw that one. It is incomplete and doesn’t work. You still need to add the token via an HTML heading as Authorization which is not mentioned in such document.  
However, even adding the token as above described I cannot make it working.

Is there anyone that has succeeded in setting the datasource in Grafana for InfluxDB2 QL language?

---

<div class="post-metadata">

**Author:** ![massaro](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@massaro](https://community.grafana.com/u/massaro)\
**Post date:** [August 18, 2023, 11:41am UTC](https://community.grafana.com/t/influxdb2-ql-datasource/101394/9 "2023-08-18T11:41:03Z")

</div>

Thanks a Million. It works now!
