Grafana v11.3.0, Infinity v3.2.1
Hi
I query the monitoring system about a cluster of systems (nodes) to finally count the number of nodes. I create an API call an receive the list of nodes for all clusters. From this output I want to filter the nodes for the production cluster or test cluster. For this I have a variable called Cluster containing several notations of prod and test.
Variable Cluster = Produktion : prod|prd|clusterp,Test : test|tst|clustert
The query result in key “id” is this:
node_test_slceph0.clustert.domain.local
node_test_slceph1.clustert.domain.local
node_test_slceph2.clustert.domain.local
node_prod_slceph0.clusterp.domain.local
node_prod_slceph1.clusterp.domain.local
node_prod_slceph2.clusterp.domain.local
For this query I used either JSON or UQL backend. The UQL looks like:
parse-json
scope "value"
project "id"
and in JSON backend:
Now I want to filter either all prod or test nodes based on variable, fixed string and regex.
Filter argument:
node_($Cluster)_sl.*($Cluster).*
Reading the doc, searching Internet. In several combinations and formats I was unable to filter the output.
Can someone help for the correct syntax/filter?
Regards Robi