Search code examples
graphite

Is is possible to configure graphite (carbon-cache) to ignore / discard a metric?


Icinga2 by default sends some of it's internal performance metrics to graphite, but I can't see a way to send my own performance data, but not the internal, so I was wondering if there was a way to configure graphite's carbon-cache to simply ignore certain metrics?

I know I could possibly work around this by using carbon-relay selectively relay on a subset, but this feels a cludge

I am also aware that it would be better if icinga2 also didn't send things I don't care about, which I will continue to look into, but i can see other use cases where I might want to stop storing certain metrics sooner than I might be able to push a code update to stop an application sending them


Solution

  • If I've understood your problem correctly, I think what you're looking for here is the carbon-cache blacklist. You specify a regular expression to ignore particular patterns of metrics.

    For example, I use:

    ^prod\.service\..+$

    ... to ignore anything starting with prod.service (unfortunately it can get messy with escaping periods!). The file can be made of any number of lines like that.