Stepping up Grafana to InfluxDB V2

With my InfluxDB V2 container setup, some tokens created, and buckets in place, its time to start stepping up services. The first service to be stepped up will of course be Grafana itself, so that once the other tools are stepped up, I can start using the dashboards again.

The majority of this reconfiguration will be done in the webui. I’ll be covering getting the data source working in this piece, and I’ll have some example dashboards at the end. The first step is to reconfigure the influxdb data source to use FLUX query language. Grafana then provides different authentication options to use for the data source.

Changing the Data Source to Flux

For these, we’ll need the token we created earlier in influxdb. This token was created with read access to all buckets in our organization. We’ll want to go to the influxdb webui, to the data -> tokens area, and pick our grafana token, copying the text and pasting it into the grafana webui.

Grabbing the Token from Influx

The URL for my influx matches my influxdb v1 instance since it upgraded in place. Authentication with the new influx is default to the tokens only, no need to turn on basic auth or credentials in it. We’ll want to match the organization and bucket to the options we provided to influx when creating our account on there and the bucket we created for the data.

Datasource Configuration

Run a save and test with all the configuration options in place and we’ll see our system is finally operational. We have grafana reading the new database instance.

Successful Test

The next step is to step up my telegraf configuration to use the new version. This will be the first of the few services I run to step up. I managed to get a minimal dashboard from the grafana site to make use of until I can find one more fully featured (data from the future telegraf setup article).

Dashboard Finally Showing some Data After the Step Up

Note the flux query language is miles away from the influxdb v1 sql-like language. This means all your dashboards will need to be rebuilt to use the new language (or if you’re me, you’ll have to find new dashboards online to use).


Leave a Reply