Can use regex to cut/parse the string?

Hello folks!
Hope you are doing great.
Please help me if it is possible.

  • Grafana 8.1.6

  • ** I get the metrics from node_exporter, like this:

  • path="/var/multik8s-monitoring-monitoring-grafana-pvc-pvc-4ba55d84-3f4b-11eb-b460-005056b523b5"
  • path="/var/multik8s-backup-minio-velero-pvc-12a8bbc1-d260-11eb-bc0d-005056b523b5"
  • path="/var/predator-latency-multik8s-predator-pvc-46804dd8-8013-11eb-a2f6-005056b523b5"

I am trying to cut the string and make two filter lists. The string consists from namespace-app-pvc_name.

For the list We need namespace and pvc name.
For example
List 1: predator-latency

List 2 gives us a value after filtering on the 1st step

Is there a way how I can achieve this?

Thank you beforehand!

Hello :wave: and welcome to the forum, @ha1mor

please see the detailed solution provided in this topic:

the catch here: you cannot use regex value-mapping in conjunction with template variables–def not a chained variable setup like you are attempting: