vvuksan/ganglia-misc — pull request #70 by pcpiela (2011-10-23 18:41:26+00:00)
Title: Regular expression metric graph legends

Hi Vladimir,
I would like your feedback on the attached mod. I am generating regular expression metric graphs with quite a few series that are generating large legends. I am also dealing with metrics from collectl that have very long names (much of which is common to the matched metrics, and makes the legend hard to read). To reduce the size of the legend I wanted to prune out the redundant text in the metric names, and came up with this mod. If the metric regular expression contains subexpressions, they are concatenated to make the legend label, e.g cpu_(.*) will generate labels like system, aidle, wio, ...

I am a little concerned about overloading the use of the subexpressions in the metric regular expression. I could define a separate regular expression that is applied to the matched metric to extract its label.

Peter