Separate name alias for each metric in legend

Hi,

Grafana 4.6.3
Elasticsearch 5.5.0

I have one query with two metrics used shown on single Graph panel.
I can change metrics’ name in legend by setting Alias in Metrics tab but this one in common for all metrics. Is it possible to do it separate for each metric ?

Thanks !

Hi,

Please have a look at using elasticsearch in Grafana documentation and the Series naming & alias patterns section.

Marcus

1 Like

Thanks Marcus,

I’m not sure if i can achieve what i want in the way described under link above.
You can see my graph below. What i need is to have labels in legend as CN2, CON, CYT etc.
Is it possible ?

Thanks again !

Hi,

Since the metric’s are named ProfileSync::<name>::TotalTime there’s not much you can do. One way of doing it is to have multiple queries.

There’s an old issue regarding regex support for alias and metrics name here. Please upvote the issue with a :+1: if you find it important for you.

Marcus

Thanks Marcus!

I’ve just voted :slight_smile:

And maybe it would be good idea to allow setting Alias manually per Metric, not only per Query ?

Thanks @mefraimsson.
This documentation helped me. I am able to show field name instead of <metric + field> in legend using {{field}}.
But I am not able to give any custom name to a specific metric individually.

1 Like