I have a grafana dashboard that I want to filter by 2 variables:
- Kubernetes namespace (which I can easily get from Prometheus)
- AWS SQS Queue - get only the queues whose names are contained in the namespace from #1
This is relatively easy - I filter via a regex based on ${namespace} and everything works:
The problem arises when I want to perform a string manipulation on the namespace variable before using it to filter out values, e.g. my namespace is called mvng-test-pipeline, but I only want to see queues whose names contain "test-pipeline" (disregard the "mvng-" prefix). I didn't find a way to do it via regex. I also tried to create an intermediate variable, but surprisingly, I couldn't find a way to manipulate the variables using even the simplest string manipulations such as replace() or substring().
Would appreciate any help, 10x