我想要一张如下图表,显示注册用户数在上午9:41为0,在上午9:46增加41:
http://img59.imageshack.us/img59/7989/localhostscreencapture2.png
但是我得到了这张石墨图表(我在上午9:46将statsd计数器增加了41):
http://img829.imageshack.us/img829/8702/graphitedevreqordercom.png
我的渲染请求是(有人向我推荐了hitcount方法):
渲染/?width = 586& height = 308& _salt = 1336642203.533& target = hitcount(stats_counts.reqorder.staging.community.1.membership.total,“1min”)& from = 09%3A40_20120509& until = 09%3A50_20120509
如何更改渲染网址请求以获取如下图表:
http://img59.imageshack.us/img59/7989/localhostscreencapture2.png
答案 0 :(得分:2)
您需要integral()
功能而不是hitcount()
:
http://graphite.readthedocs.org/en/0.9.10/functions.html#graphite.render.functions.integral
所以你的完整查询将是:
integral(stats_counts.reqorder.staging.community.1.membership.total)
注意虽然integral()
的结果总是从图表左侧的0开始。我不认为有办法解决这个问题。