How to modify metric name carbon.agents.xxxxx

Asked by Michael Martinez on 2017-08-03

Currently the internal statistics of my carbon-cache instances appear as "carbon.agents.ip-xxx-<port>.*"
I would like to change this to something that where I can use Grafana's wildcards, for example "carbon.agents.ec2-xxx-<clustername>-port"

Is there a setting that will allow me to change this?

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Martinez
Solved:
2017-08-05
Last query:
2017-08-05
Last reply:
2017-08-03
Denis Zhdanov (deniszhdanov) said : #1

You can change prefix - default is `carbon`, by setting CARBON_METRIC_PREFIX variable. 'agents' part is hardcoded, and 'ip-xxx' - that's your hostname and <port> - that's your instance.
You can change that only editing source code - https://github.com/graphite-project/carbon/blob/5ec7e39c6fc6002d8d4db9f145e0d3f60a5faa1b/lib/carbon/instrumentation.py#L168

Michael Martinez (mwtzzz) said : #2

Yep, that's what I figured after looking into it a little. Thanks for confirming that. I decided to go ahead and just set CARBON_METRIC_PREFIX to 'carbon.<clustername>' and update my grafana dashboards appropriately.