snippetMinor
How to filter label_values in Loki?
Viewed 0 times
filterlabel_valueslokihow
Problem
I want to create a query variable in grafana using Loki that returns all the possible label values of the label baz such that they only include label values that exist where the label foo equals "bar".
Looking at the docs, I came up with the following query for the variable:
label_values(rate({foo=~"bar"}, baz)
However this returned all the possible baz label values and not only those that exist while foo="bar", basically the results are the same as:
label_values(baz)
What am I doing wrong? thank you.
Looking at the docs, I came up with the following query for the variable:
label_values(rate({foo=~"bar"}, baz)
However this returned all the possible baz label values and not only those that exist while foo="bar", basically the results are the same as:
label_values(baz)
What am I doing wrong? thank you.
Solution
After researching this, i've found an open issue on grafana's github. At the time of writing its still in the backlog.
Context
StackExchange DevOps Q#12874, answer score: 2
Revisions (0)
No revisions yet.