Feeding sub-second metrics into Graphite

Asked by Mike


I know that Whisper is currently not intended for storing metrics on a sub-second resolution, but I was wondering if Graphite can roll up sub-second metrics into one based on some aggregation function.

For example, I have a system.core.0 metric that is being sampled 4 times a second. Is it possible for Graphite to take the 4 samples that come in within a second, and only keep the maximum or maybe average?


Question information

English Edit question
Graphite Edit question
No assignee Edit question
Solved by:
Michael Leinartas
Last query:
Last reply:
Revision history for this message
Best Michael Leinartas (mleinartas) said :

You can use the carbon-aggregator daemon to do this but it's honestly not very well suited for it (it's intended more for aggregation multiple metrics into one). A better approach is to do the aggregation before it gets to Graphite either in the collector or using statsd or one of its variants.

Revision history for this message
Francois Mikus (fmikus) said :

Or directly in the code, using classes for creating meaningful metrics. Ex. metrics.codahale.com which is a bunch of Java classes to can create useful stuff to send to graphite, instead of inundating graphite with stats that need to be munged.

Hope this helps. I do not know if metrics also has equivalents for python, perl, .net etc.



Revision history for this message
Mike (mapa3m) said :

Thank you for the suggestions! I ended up writing a roll-up method in my Python metrics collector, which seems to be working out pretty well.

Revision history for this message
Mike (mapa3m) said :

Thanks Michael Leinartas, that solved my question.