grafana / kairosdb-datasource

Data source plugin for KairosDB
Apache License 2.0
30 stars 62 forks source link

Support for a function called "$group_by" when putting in the alias name #33

Closed justmedude closed 7 years ago

justmedude commented 8 years ago

When graphing a metric with a combination of "group by" options, it's not as interesting to keep listing of the metric name. Rather, I often want to use the "group by" name as the label. This supports that.

Usage: When adding a graph with a "Group By" option, you can change the alias label using the variable "$group_by()"

As an example, if you are graphing the metric of "net.stats" with a group by option of "ifOut", you can put into the alias field "$group_by(ifOut)".

Play around with it. My javascript is...not so great. But, hopefully this is of use to others.