1
votes

I have Grafana metrics (Graphite as backend) with metrics named like this:

stats.counters.appserver.det.timeout.5287534957488140100.count

I'd like to replace the guid (5287534957488140100) with a more human readable string but at the time of sending the metrics to statsd (which in turn sends data to graphite) I don't have that available.

Is it possible to do this replacement afterwards? I have the human readable string connected to the guid in a separate database but I can send that to statsd/graphite/grafana in intervals / whenever a new one is added if I know how.

It seems like the graphite function aliasByNode could be used for this but how would I get the data I want to replace with into graphite dynamically?

1

1 Answers

1
votes

You can rewrite every metric in the carbon-relay. If you use:

Note that you could match and replace only the 5287534957488140100, but keep in mind (especially with carbon-relay) it can be expensive.

A different approach would be to leave this metric as is and additionally create an alias - Can Graphite (whisper) metrics be aliased?.