Framework for intercepting and modifying Carbon (Graphite) metrics

npm install carbon-streams
8 downloads in the last month

Simple stream objects for working with Carbon (Graphite) streams.


I need to implement a simple metric key mangler for my Graphite infrastructure. collectd is great for capturing metrics, but the paths are a bit verbose. For example, I think the following make a little more sense: → → → → →

You might also want to derive a hierarchy from a well-structured hostname. Instead of usw2a-dev-webserver-01 you could do dev.usw2a.webserver-01. Or you could drop a metric entirely.

Some of this can be implemented with Carbon's own rewrite-rules.conf, but those are fairly limited to prefix/suffix mangling. I'm also gnawing on the idea of building a simple pub/sub mechanism with ZeroMQ so that subscribers can receive metric values in real-time, as well as notifications of metric lifecycle events (a new host comes online, or stops updating).


There's only one example right now, bit it shows how you can create a simple metric rewriter by implementing a stream.Transform instance.

npm loves you