Graphite: time per point precision
Question
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?
Solution
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.
OTHER TIPS
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