I am setting a Variable in Grafana.
I want to create a Query, that only returns a subset of the labels with value app
the ones I want to return are those ending in dev
My Query so far, returns all of the labels with value app
successfully. However, I have been unable to successfully filter the values so that only a-dev
b-dev
and c-dev
are returned.
How do I successfully apply regex (or alternative) to this query so that I can see the desired values?
Any help on this would be greatly appreciated!
I eventually figured out what I needed to do. Originally I was trying to use |
to run regex on the results from label_values.
However, this format worked:
label_values({app=~".*-dev$"}, app)
and returned only a-dev b-dev c-dev
as expected.