- What Grafana version and what operating system are you using?
Grafana 11.0.1
VictoriaMetrics 1.101.0
- What are you trying to achieve?
I have metrics of the form
peer_connectivity{instance="a", our_id="xxxx", peer_id="yyyy"} 1
peer_connectivity{instance="a", our_id="xxxx", peer_id="zzzz"} 0
peer_connectivity{instance="b", our_id="yyyy", peer_id="xxxx"} 1
peer_connectivity{instance="b", our_id="yyyy", peer_id="zzzz"} 1
peer_connectivity{instance="c", our_id="zzzz", peer_id="xxxx"} 0
peer_connectivity{instance="c", our_id="zzzz", peer_id="yyyy"} 1
I want to display the connectivity between the nodes as a matrix table with the instance names on both rows and columns.
The first part is easily solved by an instant table query and a matrix transform.
However, I really want to see the instance
names, not the ids in the table row and column headers.
For one of the two that’s also easy by using the instance
as one field in the matrix. However the remaining field needs to be peer_id
.
I’m looking for a way to replace / transform / lookup the label peer_id
(or table fields, depending how you look at it) with the corresponding instance
by looking at the our_id
label.
- How are you trying to achieve it?
I’ve tried several different transform that seemed likely but none seems to be able to do what I’m looking for.
I also tried adding a second query, either as table or time series and use that as the source for the transformation, but I couldn’t find a combination that works.