Feeding sub-second metrics into Graphite

Asked by Mike on 2012-05-22


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:
Best Michael Leinartas (mleinartas) said : #1

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.

Francois Mikus (fmikus) said : #2

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.



Mike (mapa3m) said : #3

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.

Mike (mapa3m) said : #4

Thanks Michael Leinartas, that solved my question.