1

we have prometheus datasource and I’m stuck at trying to use custom variable with few values as comma separated values, I wanted to use it to replace as regex in the label_values(job=~$"{eks_cluster:regex}"), but i get the error templating variables could not be initialized. Following are the screenshots to show what I’m trying to achieve enter image description here

enter image description here

Amjad Hussain Syed
  • 994
  • 2
  • 11
  • 23

1 Answers1

3

Your problem is not with the eks_cluster variable. This will just as much not work if the query is simply label_values(job=~".")

The label_values query, as described in Grafana documentation, takes either a label name or a label name and a metric name. It does not take a match to do whatever you wanted it to do. If you want to filter the values returned, use the Regex field just below Query.

Michał Politowski
  • 4,288
  • 3
  • 30
  • 41