Low slow queries in influxdb2

On a busy influxdb2 instance I want to find which queries are heavy, which queries cause a high cpu load.

I could easily do that on Influxdb 1 using the ’ log-queries-after’ feature.

How can I achieve this on influxdb2? See actual queries that take relatively long.

I have installed a telegraf template influxdb2_oss_metrics to monitor my server. That indeed gives some insights on number of queries/s, but not what particular queries are slow/heavy.

version info: influxdb2 2.5.1-1 on ubuntu

Hello @harm,
Unfortunately I think you might have to check individual queries.
You can use the following:


Thats a major feature gap of influxdb v2.x (IMHO)

Of course you optimise your queries during development using the tools you mentioned, and you should. Ppl do make mistakes though…

Then still, during production, data always tends to grow in some unexpected manor, so that one of your queries performs worse than you thought.

So on a production system you should be able to do some analysis to figure out, what is causing load.
Are that some unlucky queries that needs rewriting, or is the load rather caused by fast query that are queried far too often, or is it the input side.

Not being able to find the first type (queries that behave badly) on a live system seems pretty bad to my.

All major databases provide this (or similar) feature (as did influxdb1.x !!).