I think the flatten node https://docs.influxdata.com/kapacitor/v1.1/nodes/flatten_node/ might be what you are looking for, but its a little hard to tell without example data.
On Wednesday, January 11, 2017 at 4:08:11 AM UTC-7, [email protected] wrote: > > Helllo, > I'm trying to count requests and their total size that come to my system > from couple APIs and I can't figure out how to combine the measurements > together. > This is my TICK script: > > <pre> > var api_node = batch > |query(''' > SELECT "size" FROM "database"."api.requests"./.+/ > ''').period(1m) > .every(1m) > .align() > |eval(lambda: ceil(float("size") / 1024.0)) > .as('full_requests') > .keep('size', 'full_requests') > > var count_node = api_node > |sum('full_requests') > .as('requests') > > var sum_node = api_node > |sum('size') > .as('sum') > > count_node > |join(sum_node) > .as('count', 'size') > |influxDBOut() > .database('database') > .retentionPolicy('default') > .measurement('requests') > .precision('s') > </pre> > > Right now in the "api.requests" retention policy there are 2 measurements > and batches from these measurements travel through pipeline separately - 2 > points arrive at the influxDBOut node. I want them grouped together so I > get a sum of both of them. > How can I achieve that? The important aspect is that I don't have a > guarantee that there are points in every period in every measurements, so > joining 2 batches doesn't always work. > > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/bac55c51-fa92-4a22-bc58-dd60a3b1a23c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
