Graphite: time per point precision

旧街凉风 提交于 2019-12-12 01:12:31

问题


Is it possibile to store time per point with millisecond precision?

Since Graphite is based on Whisper I've took a look at whisper.py file. It contains:

UnitMultipliers = {
   's' : 1,
   'm' : 60,
   'h' : 60 * 60,
   'd' : 60 * 60 * 24,
   'y' : 60 * 60 * 24 * 365,
}

so it seems that it's possibile to record events with a maximum precision of 1s. How can I cope with a system that produces an event every 10ms?


回答1:


You can send the data to the carbon-aggregator daemon or Statsd. These are both aggregators, so they'd aggregate the millisecond data and write it out in a per second value. For carbon-aggregator, you'd have to config the aggregator with how you want the data gathered: sum, avg, etc. For Statsd, the api call determines the aggregation used, so you don't have to pre-configure it.




回答2:


Given that graphite is unable to store metrics at a 10ms interval you could try sending the data to the statsD system. Then flush the metrics from statsD to graphite.

You can find the statsD code on github.com

Introduction to statsD on codeascraft.etsy.com



来源:https://stackoverflow.com/questions/8216736/graphite-time-per-point-precision

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!