graphite-project / carbon

Carbon is one of the components of Graphite, and is responsible for receiving metrics over the network and writing them down to disk using a storage backend.
http://graphite.readthedocs.org/
Apache License 2.0
1.51k stars 490 forks source link

Feature: rewrite rules for relay and cache #541

Closed zerthimon closed 6 years ago

zerthimon commented 8 years ago

It'd be most awesome if rewrite rules could be implemented in relay and cache, in the same way they are implemented in aggregator. This would allow for greater flexibility when designing metrics namespaces.

ganiserb commented 6 years ago

I agree. Currently, I'm sending metrics via UDP to carbon-relay, this relays them to carbon-aggregator via pickle where they are rewritten and forwarded to carbon-cache via pickle :/ Wish it could be simpler

DanCech commented 6 years ago

You can use carbon-aggregator-cache to run aggregation and cache in the same process.

ganiserb commented 6 years ago

@DanCech I find this section confusing.

Why does the carbon-aggregator-cache.py daemon need the relay-rules.conf file given that carbon-cache.py and carbon-aggregator.py do not? Does it also do relaying like carbon-relay.py does?

Also, which settings does the [aggregator-cache] section support in the carbon.conf file? It has no example section in the carbon.conf.example file. Maybe a union of both [cache] and [aggregator]?

DanCech commented 6 years ago

That appears to be a typo, the relay-rules.conf would be used by carbon-aggregator, not carbon-aggregator-cache.

I haven't used it myself, but it appears that it will look for an [aggregator-cache] section that can contain all the settings applicable to the aggregator and the cache.