Influxdb schema

I’ve set up influxdb and grafana, and the preconfigured Grafana dashboard at * seems to be partially working - simple http_req_duration shows data but “Virtual Users”, “Requests per Second”, etc are empty.

There doesn’t seem to be any advice as to how the data is stored so that I can play with the dashboard settings though.


I just tested with the latest Docker images of Grafana and InfluxDB, and the latest k6 version and didn’t see any issues with the custom dashboard:

Are you sure you setup the InfluxDB data source correctly? See the documentation.

There doesn’t seem to be any advice as to how the data is stored so that I can play with the dashboard settings though.

The data is stored in InfluxDB and is retrieved by Grafana. There is an example in the documentation for writing your own InfluxQL queries and you can see how the custom dashboard is built and edit that as needed, but for details it’s best to read the Grafana/InfluxDB documentation.

Out of curiosity, do you know which version of influxdb you are using?

I have tried using docker image influxdb:latest, which is running influx 1.7.10, and docker image influxdb:1.6.6.

Strange but it seems that GROUP BY time() isn’t working properly (details in my SO question here)

I’m testing with InfluxDB 1.7.10, Grafana 6.7.1 and k6 0.26.2.

I don’t see any issues with grouping by time:

Try specifying a different time range or duration unit in your queries, and using Grafana’s query inspector to see what the dashboard is using.

It seems to be some strange thing with influxdb. The below is from 1.7.10 -

For some reason, it is limiting the time groups to about 5 days ago.

I have played with this using as many variations as I can think of; I even created my own data. It’s just behaving poorly for some reason.

Not sure why you’re seeing that behavior with InfluxDB. I would instinctively blame Windows :slight_smile: but you’re using Docker so it shouldn’t matter. It might be worth opening an issue on their tracker.

FWIW I do get results for the group by time query:

I am blown away. I had given up and restarted my machine for another reason, I just happened to look and it had started working for the first time?!

The whole stack from k6 execution to the Grafana dashboard template to InfluxDB “group by time” queries.

Weirdest thing that I’ve seen.

Oh well, back to the k6 evaluation. :slight_smile:

Thanks for your help.

1 Like