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:


What am I doing wrong? thank you.


After researching this, i've found an open issue on grafana's github. At the time of writing its still in the backlog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.