0

I have a grafana instance that monitors certain releases deployed in a namespace. The namespace is hardcoded in my queries for graphs like

jenkins_health_check_score{namespace="build",release="$release"}

And I want to filter based on only the variable release

The problem right now is that grafana will list the release names deployed in ALL namespaces in the filter. But I want it to list only the releases deployed in the build namespace.

My current config looks like

enter image description here

I tried doing something like

label_values(release)
label_values(namespace="build")

But that does not work.

I get the error

Template variables could not be initialized: 2:13: parse error: could not parse remaining input "(release)\nlabel"...

What am I doing wrong here ?

Jason Stanley
  • 386
  • 1
  • 3
  • 20

1 Answers1

1

Try this:

Query: query_result(jenkins_health_check_score{namespace="build"})
Regex: /release="([^"]+)"/
  • This does not work. `jenkins_health_check_score{namespace="build",release="$release"}` is the Metrics query of my graph. So I cant use it in my variable query unfortunately. – Jason Stanley Jan 27 '20 at 15:09