I was wondering if someone out there could offer some advice on setting up 
a CQ for my system.  It would appear CQs might not be powerful enough to 
accomplish what i'm after, but im still new-ish to influx so maybe im wrong?


I have a system where multiple nodes out in the world transmit packets of 
data once per minute, that contain 60 samples each, 1 for each second.  The 
data is received and stored in influxdb.  Note that this packet of 60 
samples from a given node could be received at any time over the minute. 
Thus, from influx's perspective there could be up to 1 minute of latency 
before receiving the next 60 seconds of data with respect to the start of 
each new minute.

With this set up, I would like to have a CQ perform a 20second median on 
the second by second data.

However it would seem that the latency of my system poses a problem to CQ 
usage. It would seem that CQ's  need to execute within the vicinity of 
now() and  for my case would occur on a 20second clock boundary.  Given my 
setup, there would be many cases where the data simply hasnt arrived yet 
when the query ran due to my 1 minute latency.  I tried adding an offset in 
the GROUP BY time(), but this doesnt seem to work (as expected after 
reading the docs, 
https://docs.influxdata.com/influxdb/v1.0/query_language/continuous_queries/)


Below is an example of one of the many queries I have tried:

CREATE CONTINUOUS QUERY foo ON db RESAMPLE EVERY 20s BEGIN SELECT 
median(aa) AS aa INTO foomeas FROM barmeas GROUP BY time(20s, -60s),*  END


Is there any way to make CQs work with my system given the latency?

I suspect it would work if I were computing 5 minute medians as I could 
then offset by -1m, but that is not what i'm after.  Or maybe im confused.

Any advice would be much appreciated!

Mike

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@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/7574ae65-fdcf-4417-b299-d72471d79ff8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to