Add a filter option to the graphite bridge.#62
Add a filter option to the graphite bridge.#62iksaif wants to merge 1 commit intoprometheus:masterprometheus/client_python:masterfrom
Conversation
This makes it easy to only export a set of the metrics to Graphite which is useful when you need only part of your metrics in Graphite.
|
If you want to only export some metrics you should use a custom registry, rather than using a filter. |
|
That means that graphite specific choices will influence the way I use prometheus. In this case, I'd like to use prometheus as usual, putting all my metrics into /metrics, which is totally what I want but I would also like to export a subset of these metrics to graphite. |
|
That should work fine with custom registries, a collector can be in more than one registry. |
|
Right, I guess one way to not affect my program too much is to have two registries. The default one when I store everything and another one that I use only for what I want in graphite. Is that what you meant ? I guess I won't have too much data so it should be ok to duplicate it. |
|
Yes, that's what I meant. Using a regex is not the ideal solution as you're dealing with the samples as munged strings. rather than time series with labels. There'll be a feature in future for http exposition allowing requesting a subset of metrics, and it'd be best to tie this sort of thing into that rather than a graphite-specific solution. |
This makes it easy to only export a set of the metrics to Graphite
which is useful when you need only part of your metrics in Graphite.