I created a new Graph in Grafana that takes data from OpenTSDB.
The Alias field has the following value: Label $metric $tag_host
.
when it is interpreted, it looks like this:
Label $metric myhost1
- ...
Label $metric myhostn
but I want to look like this:
Label xyz myhost1
- ...
Label xyz myhostn
wherexyz
is the value of the Metric field.
So, for a key (E.g.: host
) in Tags, I can use $tag_<key>
(E.g.: $tag_host
) in Alias.
I want to achieve the same behavior for the hard-coded Metric value (E.g.: xyz
), such that if someone wants to change the Metric value in the future from xyz
to abc
, the Alias should be updated automatically.
I tried to use:
$metric
$Metric
$tag_metric
but they didn't work.
Is it possible to use the Metric value in Alias without hard-coding in Alias (the hard-coding from Metric is enough)?
xyz
) per graph (I have many values in different graphs from the same dashboard). I know that I can use the same value in Alias asLabel xyz $tag_host
, but I would like to use something likeLabel $metric $tag_host
instead, to be sure that it works even if someone changes only the Metric value after a while. – Dictograph