How to modify metric name carbon.agents.xxxxx

Asked by Michael Martinez

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:
Last query:
Last reply:
Revision history for this message
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

Revision history for this message
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.