Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Alias metrics by a label value #29

Open
ghost opened this issue Nov 30, 2018 · 0 comments
Open

Alias metrics by a label value #29

ghost opened this issue Nov 30, 2018 · 0 comments
Assignees

Comments

@ghost
Copy link

ghost commented Nov 30, 2018

Use case : I want to display the traffic by campaignID ; so I use campaignID as the reducer and I get 10 series to display ; in the legend I want to name each metric with the campaignID value, but there is no way to do that with the "User friendly query builder".

To do this, I have to write it in Warpscipt and add :
<% DROP DUP LABELS 'campaignID' GET RENAME %> LMAP SORT

But Warpscript is less user friendly :-) and this is a very common use case ; in fact I do that for all graph panels.

Proposal : do it the same way than Prometheus with a field "Legend Format" where you can set exactly what you want to display ; {{campaignID}} means for example the value of the label campaignID

@miton18 miton18 self-assigned this Nov 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant