Discussion:
[influxdb] change policy / algorithm of how data is rolled up by time
Travis Keep
2017-01-27 16:55:05 UTC
Permalink
Question:

Is there a way to configure how influx rolls up data for group by time(5m)
queries? For instance, tell influx to average the timestamps of each time
range instead of reporting the start timestamp of each range?

Clarification:

Currently if you add "group by time(5m)" Influx will average all the values
between 10:00 and 10:05 and report that average @ 10:00; then average
values between 10:05 and 10:10 and report that average @ 10:05. We want
influx to report the midpoint time rather than the start time so that the
average of values between 10:00 and 10:05 is reported @ 10:02:30, not
10:00. Is this possible to do?
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/7a7b45f1-21d0-43da-952d-9bc93e450bd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Travis Keep
2017-01-27 17:02:51 UTC
Permalink
So one thing I did try was this:

select time + 150s, mean(value) from "a_test_metric" where time > now() -
1h group by time(5m) but this give an error:

ERR: error parsing query: mixing aggregate and non-aggregate queries is not
supported.
Post by Travis Keep
Is there a way to configure how influx rolls up data for group by time(5m)
queries? For instance, tell influx to average the timestamps of each time
range instead of reporting the start timestamp of each range?
Currently if you add "group by time(5m)" Influx will average all the
want influx to report the midpoint time rather than the start time so that
10:00. Is this possible to do?
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/bb67c09d-ec96-4dfb-94f1-f7594fb08e20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
t***@gmail.com
2017-11-23 21:50:41 UTC
Permalink
Hey, if the shifted data come from continous query, you might be able to rewrite it to kapacitor TICK script and use the shoft node:
https://docs.influxdata.com/kapacitor/v1.3/nodes/shift_node/
Is there a way to configure how influx rolls up data for group by time(5m) queries? For instance, tell influx to average the  timestamps of each time range instead of reporting the start timestamp of each range?
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/ff264b84-3946-4b92-958e-79f977a515a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...