KairosDB - 再次聚合,聚合,聚合

时间:2018-01-26 08:48:21

标签: kairosdb

KairosDB版本1.1.3-1。

我有[time, name, key, value]的dataPoints。 是否可以首先按namekey对它们进行分组,然后汇总结果,然后再按key对它们进行分组,然后再次汇总?

基本上是这样的:

  1. name1 + key1的所有值以及name2 + key1的所有值
  2. 每个平均聚合(10秒)
  3. key1分组汇总结果(我想在此处合并结果)
  4. 按总和(同期,10秒)汇总给定结果。

1 个答案:

答案 0 :(得分:1)

No you cannot do that. You only can group once, and cannot merge the groups afterwards.

We did our own extension to kairosdb supporting a similar feature (merging all groups of a metric with a sum/avg...), but it's so intrusive (we override kairosdb query handler by our own) that we did not contribute to open source.

Edit: You may try to use kairosDB post-processing script that is designed for that: https://github.com/kairosdb/kairos-script