influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Enhancement request: Allow nested select functions, ex: select sum(derivate(value))...;

Open cboggs opened this issue 12 years ago • 14 comments

We store our data in InfluxDB such that each individual metric is its own series, and we insert a hostname value into each update so that we can build out dashboards for clustered services without falling back to regex'd series names, and we keep our series count down.

Some of our metrics are counters that we take a derivative of at search time. When viewing each host individually this works fine, but if I want to roll up those values easily across a set of hostnames that exist in the series, I can't do much other than: select derivative(value) from seriesName group by time(30s), hostname; and then see independent lines graphed for each hostname in tools like Grafana.

If I could instead query it as follows, aggregate graphs would be much easier and more universally applicable: select sum(derivative(value)) from seriesName group by time(30s);

cboggs avatar Aug 15 '14 20:08 cboggs

This should address all nested aggregates. Or at least return an error for invalid combinations.

jvshahid avatar Sep 11 '14 15:09 jvshahid

:+1: sum(derivative(value)) would also be very useful for me.

reardencode avatar Feb 27 '15 23:02 reardencode

+1

srikara avatar Dec 01 '15 02:12 srikara

mean(derivative(value)) would be very welcome

h-svab avatar Dec 02 '15 13:12 h-svab

+1

grypyrg avatar Jan 12 '16 23:01 grypyrg

+1

daniel-nichter avatar Jan 12 '16 23:01 daniel-nichter

+1

nethalo avatar Jan 21 '16 19:01 nethalo

As mentioned in my post to the mailing list we are experimenting with simplifying our open GitHub Issues. This feature request has been rolled into an aggregate issue for all function requests, so that we can close this issue until we are ready to work on it.

You may continue to make comments here. Closing the issue does not mean we are rejecting this idea.

beckettsean avatar Mar 18 '16 22:03 beckettsean

I'm getting error parsing query: expected field argument in sum() for SELECT sum(non_negative_derivative("requests_started", 1s)) FROM "nginx.status" WHERE "host" =~ /censored-.*/ AND $timeFilter GROUP BY "host" - is it the same issue, should I reopen it?

fillest avatar Oct 27 '16 18:10 fillest

Aaah sorry, I didn't read previous comment about the aggregated issue.

fillest avatar Oct 27 '16 18:10 fillest

+1

erowan avatar Mar 22 '17 10:03 erowan

+1

dddda212 avatar Dec 25 '17 14:12 dddda212

+1

leftwukaixing avatar Jan 15 '18 06:01 leftwukaixing

+1 sum(non_negative_derivative(value)) would be useful for me

henriklb avatar Jul 23 '18 10:07 henriklb