"For example I want to query sum of count of all browsers. Can I do something like this for the same? sumSeries(count.*)"
No, actually. Why? A wildcard is applicable to only at that depth of the subtree. So your *
will not resolve all subtrees beneath the metric where you use it, but will just give you all possible paths at that level.
count.chrome 12 time
count.ie 10 time
count.chrome.host1 10 time
count.chrome.host2 11 time
count.ie.host2 9 time
In this case, the metric tree would be like-
count/chrome.wsp
count/ie.wsp
count/chrome/host1.wsp
count/chrome/host2.wsp
count/ie/host2.wsp
So as you see, chrome
and ie
are both metrics and directories here. Querying multiple levels indeed requires a query like- sumSeries(count.*,count.*.*,count.*.*.*)
"that means we have to remember all possible metric names"
Not really. With a little intelligent naming scheme for your metrics, you can easily bypass this limitation. What you have to know is the maximum depth of your tree. Also, Graphite supports all perl-based regexes, so you aren't limited to just *
.