I’d like to do something like:
SELECT derivative(mean(*), 1s)/100 FROM "cpu" WHERE ("sensu_entity_name" =~ /^$hostname$/) AND $timeFilter GROUP BY time($__interval) fill(null)
but unfortunately I receive
InfluxDB Error: unsupported expression with wildcard: mean()
I Can see from the docs that I can not calculate with functions this way. But I’m stuck on building a subquery.
Any help is highly appreciated
Welcome!! First, I’d like to encourage you. to try updating to 2.0 and using Flux because I genuinely feel that it’s easier.
Ok, now for your question. I’m a little confused by the
group by time (interval) portion. Can you please explain a little bit more what you expect there?
I believe you’re looking to use a nested subquery.
SELECT derivative("mean") FROM (SELECT mean("my data") AS "mean"....)