- What Grafana version and what operating system are you using?
v11.3.2 on Linux
- What are you trying to achieve?
I want to use a single Query on an elasticsearch data source to provide multiple metrics and then use those metrics in an Expression.
- How are you trying to achieve it?
In my Expression, I tried using the identifier that I would use to reference a given metric in a Transformation: ${Sum foo.bar.baz}
.
I also tried using a Transformation to reference a metric and then referencing the Transformation via its alias, e.g. ${abs-sum-foobarbaz}
, in my Expression, but it appears as if I cannot reference a Transformation from an Expression.
- What happened?
Both attempts yield an error message: "Query data error"
.
- What did you expect to happen?
I expected to be able to perform mathematical operations on my various metrics within the Expression, for example 1 + ${Sum foo.bar.baz}
would produce a number 5
in my Gauge visualization.
- Can you copy/paste the configuration(s) that you are having problems with?
I can’t copy-paste because this is for work, and I’m not to disclose any info about data schemas. But here’s a screenshot with some areas covered.
- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
Here’s the error from the Grafana UI, produced during the Transformation attempt (with some sections collapsed for the reason given above):
- Did you follow any online instructions? If so, what is the URL?
I have no instructions.