Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Correct use of Graphite metric names

I build a web analytics tool and consider to use Graphite. This is a very basic tool with just a few interesting dimentions but there are multiple dimensions associated with a measurement. For example when a user hits the site I want to keep track of geography, browser etc. The metric name would probably be:

usa.chrome.windows8.organic...

I can then use wildcards to do interesting queries.

Is this abuse of metric names (and Graphite in general), or is it a good approach as long as I only care about a small amount of metrics.

like image 496
Yaron Naveh Avatar asked Dec 12 '22 13:12

Yaron Naveh


1 Answers

I think the approach will be fine, although there are some important considerations when naming the metrics. Because Graphite will store a .wsp file for every metric name you'll have a difficult time re-sizing or adjusting the storage settings should you decide to change your configuration. Additionally, the Graphite UI will have a "folder" for every metric name so you can easily make the UI unusable.

Graphite recommends that "Volatile path components should be kept as deep into the hierarchy as possible". This essentially means that if you can push the parts of the metrics that are frequently unique to the end of the "bucket" without impacting your grouping queries you should try to do so.

Here is a great post on using Graphite that includes naming recommendations. And here is another one with additional info from Jason Dixon (an excellent source for Graphite stuff in general).

like image 169
Matt Self Avatar answered Jan 06 '23 04:01

Matt Self