Carbon Aggregator 重新聚合指标

Carbon Aggregator re-aggregating metric

我有以下聚合规则:

abc.prod.ALL.<service>.<metric>.count (60) = sum abc.local.*.<service>.<<metric>>.count 给出的指标如下:

abc.prod.host1.aservice.ametric.count
abc.prod.host2.aservice.ametric.count

我希望它们聚合到

abc.prod.ALL.aservice.ametric.count

但从未创建该指标。在聚合器日志中,我看到

Allocating new metric buffer for abc.prod.ALL.aservice.ametric.count

但未创建。如果我向生成的指标添加一个层,例如:

abc.prod.extralayer.ALL.<service>.<metric>.count (60) = sum abc.local.*.<service>.<<metric>>.count

然后我们似乎得到了创建指标的递归爆炸式增长:

abc.prod.extralayer.ALL.aservice.ametric.count
abc.prod.extralayer.ALL.ALL.aservice.ametric.count
abc.prod.extralayer.ALL.ALL.ALL.aservice.ametric.count
abc.prod.extralayer.ALL.ALL.ALL.ALL.aservice.ametric.count

这让我相信生成的指标会再次聚合...

我在 AggregationProcessor.process 中添加了一个日志行:

  else:
    log.clients("Found aggregate " + aggregate_metric + " for " + metric)
    aggregate_metrics.add(aggregate_metric)

然后尝试使用我最初想要的规则..我最终开始看到,日志行如下:

Found aggregate abc.prod.ALL.aservice.ametric.count for abc.prod.ALL.aservice.ametric.count

它与自身相匹配,就好像它是一个新的传入指标...为什么它被反馈到聚合器中?

这似乎是一个错误。它不在旧版本中,但在我提出问题时在 master 中。

如果您看到此行为,请关注 GitHub 上的问题: https://github.com/graphite-project/carbon/issues/560 https://github.com/graphite-project/carbon/issues/455

在 SO 上继续提问是没有意义的。

注意:我使用的是旧版本,0.9.15,没有看到问题 - 所以我推荐这个,直到确认在 master 中没有解决。