石墨:求和与模式匹配的所有统计信息? [英] Graphite: sum all stats that match a pattern?
问题描述
我正在通过statsd
将统计信息发送到Graphite服务器.我的统计数据相当精细,开发人员可以轻松添加.我想汇总与某个模式(例如stats.timers.api.*.200.count
)匹配的所有统计信息.在Graphite中有可能吗?
I'm sending stats to a Graphite server via statsd
. My stats are fairly fine-grained, and can be easily added by developers. I'd like to roll up all statistics matching a certain pattern (stats.timers.api.*.200.count
, for example). Is that possible within Graphite?
如果没有,我是否应该查看其他可以从statsd
生成此类汇总数据的系统?还是这是我应该直接在statsd
配置中执行的事情?
If not, are there other systems that I should be looking at that can generate that type of roll-up data from statsd
? Or is this the sort of thing that I should do within my statsd
configuration directly?
推荐答案
If you after a blanket sum of all the data that matches, then you can use 1 sumSeries.
一个例子:
sumSeries(stats.timers.api.*.200.count)
将为您提供与stats.timers.api.*.200.count相匹配的所有内容的总和
would give you the total for everything that matches stats.timers.api.*.200.count
您可以通过将分组在一起. "noreferrer"> 2 groupByNode.
You can group metrics together via the 2 groupByNode.
一个例子
groupByNode(stats.timers.api.*.*.count,4,"sumSeries")
将在第4列给您总计与stats.timers.api.*匹配的所有计时器的总和(在本例中为返回代码?)
would give you a a sum of all the timers that match stats.timers.api.*, by the 4th column ( in this case return code? )
所有功能都记录在 http://graphite.readthedocs.org/en/1.0/functions.html
这篇关于石墨:求和与模式匹配的所有统计信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!