You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you will need to perform different aggregation operations over time and between series. e.g. take the difference between the last and first sample in the time period then find the average between the series.
Some scenarios were this is useful -
io_read_bytes and io_write_bytes from Telegraf, find the delta between first and last values in the time period bucket then get the average bytes per time period across your servers
power meters often have a kWh accumulator, find the delta between first and last values in the time period bucket then get the average energy used per time period across your meters
I don't believe this is currently possible, as @beckettsean indicated in #1825
The text was updated successfully, but these errors were encountered:
The possible option non_negative_derivative that I was using will give me the delta between two subsequent counter values (I'm using the counter values of a gas meter), and thus give me the amount of gas used between every datapoint. And while it allows to add an aggregation function to it, non_negative_derivative(sum(<field_key>), [<unit>]) will first sum up all counters (which result in very large values), and then calculate the non-negative derivative over these summed up values. This results however in a different yet incorrect value.
A sum(non_negative_derivative(<field_key>, [<unit>])) would however be correct, but seems to be impossible.
It seems SELECT non_negative_derivative(max(<field_key>), <unit>) FROM .... GROUP BY time(<unit>) actually returns the expected value. However, unfortunately, it seems the result of the non_negative_derivative can't be divided by a constant (as my counters are in 0.01 m3)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.
Sometimes you will need to perform different aggregation operations over time and between series. e.g. take the difference between the last and first sample in the time period then find the average between the series.
Some scenarios were this is useful -
I don't believe this is currently possible, as @beckettsean indicated in #1825
The text was updated successfully, but these errors were encountered: