grafana / kairosdb-datasource

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

Alias doesn't accept expressions #24

Closed sblatnick closed 7 years ago

sblatnick commented 8 years ago

Other datascources like OpenTSDB support expressions in the Alias field of the metric: [[customer_Name]] or \$customerName

I've noticed that tooltips and legends on graphs and table cell information get really wide because it includes the metric over and over.

For instance, let's say I group the metric by customer name and show a legend or tooltip with "all series". Then I see something like:

metric.name.here.that.is.really.long (customerInfo=Apple)
metric.name.here.that.is.really.long (customerInfo=Banana)
metric.name.here.that.is.really.long (customerInfo=Pear)
...

I could shorten the metric name, but that would still show something like:

Metric (customerInfo=Apple)
Metric (customerInfo=Banana)
Metric (customerInfo=Pear)
...

Instead, I just want to display the customer name without the redundant metric.

Apple
Banana
Pear
...

Using the same syntax as OpenTSDB, I would think this expression would work: $tag_customerInfo or [[tag_customerInfo]], but it seems the Kairos plugin doesn't support expressions.

Using Grafana 3.0.4 with KairosDB Plugin 1.0.1

ragonlan commented 8 years ago

I really miss this behavior. OpenTSDB has it and is very useful.

jifwin commented 7 years ago

Custom alias now supports templated variables. Closing.