我注意到Graphite中的数据出现奇怪的峰值,并且我正在使用Dropwizard指标将指标发送到Graphite。我专门使用Metrics meter类来收集指标。我有适当的代码来执行以下操作

public void recordMetric(){
 metricRegistry.meter("count.employee").mark();
 if (employee.getDesignation().equalsIgnoreCase("manager"){
    metricRegistry.meter("count.employee.manager").mark();
 }
}


问题是,当我在Graphite上查看“ m1_rate”时,很多情况下“ count.employee.manager”指标的比率高于“ count.employee”。这怎么可能?这抛弃了我的其他指标,并对该指标的可行性产生了怀疑。有没有人遇到这个问题?关于如何解决此问题的任何指示?我怀疑,这可能是由于Graphite中的一些古怪现象引起的,但不确定。任何帮助将不胜感激。谢谢!

最佳答案

您如何计算费率?如果使用nonNegativeDerivative()-请先应用导数,然后再应用sumSeries()-反之亦然。请检查http://www.jilles.net/perma/2013/08/22/how-to-do-graphite-derivatives-correctly/

另外,您还需要为计数器设置正确的汇总(总和),如http://obfuscurity.com/2012/05/A-Precautionary-Tale-for-Graphite-Users中所述

关于java - Dropwizard Graphite 上的公制聚集问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42080506/

10-10 01:03
查看更多