Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

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

Merged
merged 2 commits into from
Dec 19, 2016

Conversation

justmedude
Copy link
Contributor

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.

@jifwin jifwin changed the base branch from master to cleanup December 19, 2016 19:34
@jifwin jifwin merged commit 2613000 into grafana:cleanup Dec 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants