What Grafana version and what operating system are you using?
v9.3.8
What are you trying to achieve?
I’m trying to plot 3 different variables in one Times Series graph.
How are you trying to achieve it?
I use following KQL code :
adt_history
| project temperature = todouble(Value), SourceTimeStamp, Id, Key
| where $__timeFilter(SourceTimeStamp)
| where Id == ‘MTR.CMP.06’
| where Key == ‘oven1.temperature’ or Key == ‘oven2.temperature’ or Key == ‘oven3.temperature’
| order by SourceTimeStamp asc
What happened?
I get a correct times series graph, but my legend is not correctly named, see screenshot…
I made changes to my dashboard and that causes this solution not to work anymore
I use a variable on my dashboard to select which oven I want to visualize : oven 1, oven 2 or oven 3
I use a key/value inside my variable : oven 1 : MTR.CMP.06, oven 2 : MTR.CMP.10, oven 3 : MTR.CMP.15
MTR.CMP.06 / 10 / 15 is then used in my KQL statement :
adt_history
| project temperature = todouble(Value), SourceTimeStamp, Id, Key
| where $__timeFilter(SourceTimeStamp)
| where Id == '$Lijst_ovens'
| where Key == 'oven1.temperature' or Key == 'oven2.temperature' or Key == 'oven3.temperature'
| order by SourceTimeStamp asc
Now my legend override doesn’t work anymore for oven 2 & 3 because the override is not correct anymore
So I was thinking about using overrides with a name matching regex, but I don’t know how to do this. The manual is not really clear about this.
So how do I change the legend with “oven1.temperature” to “sectie 1” and “oven2.temperature” tot “sectie 2”, …