title: Can I group graphite results by regex?
body: <p>I've been using graphite for some time now in order to power our backend pythonic program. As part of my usage of it, I need to sum (using sumSeries) different metrics using wildcards.</p>
  
  <p>Thing is, I need to group them according to a pattern; say I have the following range of metric names:</p>
  
  <p><code>group.*.item.*</code></p>
  
  <p>I need to sum the values of all items, for a given group (meaning: <code>group.1.item.*</code>, <code>group.2.item.*</code>, etc)</p>
  
  <p>Unfortunately, I do not know in advance the set of existing group values, and so what I do right now is that I query <code>metrics/index.json</code>, parse the list, and generated the desired query (manually creating <code>sumSeries(group.NUMBER.item.*)</code> for every NUMBER I find in the metrics index).</p>
  
  <p>I was wondering if there was a way to have graphite do this for me, and save the first roundtrip, as the communication and pre-processing are costly (taking more than half the time of the entire process)</p>
  
  <p>Thanks in advance!</p>