I am using grafana to query prometheus for rabbitmq metrics using rabbitmq_exporter
Rabbitmq is set up as a cluster with the following values:
rabbit@node1.example.local
rabbit@node2.example.local
So when I create a dashboard I want to use a variable for the nodes in the cluster.
So i set up a variable with
label_values(rabbitmq_running, node)
which gives the following values:
rabbit@node1.example.local
rabbit@node2.example.local
When I use this variable in a dashboard e.g. rabbitmq_running{node=“$node”} this is where the issue is.
Looking at query inspector I see:
Object
xhrStatus:“complete”
request:Object
method:“GET”
url:“http://prom01a.ccs.local:9090/api/v1/query_range?query=rabbitmq_running{node%3D"rabbit%40node1\\.example\\.local"}&start=1562142810&end=1562142840&step=30”
response:Object
status:“success”
data:Object
resultType:“matrix”
result:Array[0]
The issue is there is no result as %5C has been added before the . character.
So this is a general question on variables that contain dots and are changed(added %5C) when applied during usage in a dashboard.
I would assume this is not an uncommon issue, and how are people getting over this?
I want to continue using variables as it would not be good to hard code values in dashboard