"description":"How many streams does each protocol have open.\n\nA protocol is similiar to a service except there may be many protocols for a single service. A service may have \nmultiple protocols for backwards compatibility. For example, bitswap the service is a single entity, but it supports bitswap protocols v1.1 and v1.2.\n\nA service is attached to a stream manually by the protocol developer. A service may be missing if there is no `StreamScope.SetService` call.",
"legendFormat":"max {{dir}} streams per peer –{{instance}}",
"refId":"C"
}
],
"title":"Streams per peer, aggregated",
"type":"timeseries"
},
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"description":"How many peers have N streams open",
"fieldConfig":{
"defaults":{
"color":{
"mode":"thresholds"
},
"mappings":[],
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
}
},
"overrides":[]
},
"gridPos":{
"h":8,
"w":12,
"x":0,
"y":37
},
"id":46,
"options":{
"displayMode":"gradient",
"minVizHeight":10,
"minVizWidth":0,
"orientation":"auto",
"reduceOptions":{
"calcs":[
"last"
],
"fields":"",
"values":false
},
"showUnfilled":true
},
"pluginVersion":"9.3.6",
"targets":[
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"exemplar":false,
"expr":"sum without (instance) (libp2p_rcmgr_peer_streams_bucket{dir=\"inbound\",instance=~\"$instance\"}-libp2p_rcmgr_previous_peer_streams_bucket{dir=\"inbound\",instance=~\"$instance\"})",
"format":"heatmap",
"hide":false,
"interval":"",
"legendFormat":"{{le}}",
"refId":"A"
}
],
"title":"Current inbound streams per peer histogram. Across all instances",
"type":"bargauge"
},
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"description":"How many peers have N streams open",
"fieldConfig":{
"defaults":{
"color":{
"mode":"thresholds"
},
"mappings":[],
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
}
},
"overrides":[]
},
"gridPos":{
"h":8,
"w":12,
"x":12,
"y":37
},
"id":47,
"options":{
"displayMode":"gradient",
"minVizHeight":10,
"minVizWidth":0,
"orientation":"auto",
"reduceOptions":{
"calcs":[
"last"
],
"fields":"",
"values":false
},
"showUnfilled":true
},
"pluginVersion":"9.3.6",
"targets":[
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"exemplar":false,
"expr":"sum without (instance) (libp2p_rcmgr_peer_streams_bucket{dir=\"outbound\",instance=~\"$instance\"}-libp2p_rcmgr_previous_peer_streams_bucket{dir=\"outbound\",instance=~\"$instance\"})",
"format":"heatmap",
"hide":false,
"interval":"",
"legendFormat":"{{le}}",
"refId":"A"
}
],
"title":"Current outbound streams per peer histogram. Across all instances",
"type":"bargauge"
},
{
"collapsed":false,
"gridPos":{
"h":1,
"w":24,
"x":0,
"y":45
},
"id":29,
"panels":[],
"title":"Connections",
"type":"row"
},
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"gridPos":{
"h":9,
"w":24,
"x":0,
"y":46
},
"id":31,
"options":{
"code":{
"language":"plaintext",
"showLineNumbers":false,
"showMiniMap":false
},
"content":"# Libp2p Connections\n\nBroken down by [Resource Scope](https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/README.md#resource-scopes). \nScopes represent what is imposing limits on this resource. For connections, we have three main scopes:\n\n1. System. The total number of connections owned by the process. Includes both application usable connections + the number of transient connections.\n2. Transient. The total number of connections that are being upgraded into usable connections in the process.\n3. Peer. The total number of connections associated with this peer. When a connection has this scope it is usable by the application.\n\nAn example of a System connection is a connection you can open a libp2p stream on and send data.\nA transient connection is not yet usable for application data since it may be negotiating \na security handshake or a multiplexer.\n\nConnections start in the transient scope and move over to the System and Peer scopes once they are ready to be used.\n\nIt would be unusual to see a lot of transient connections. It would also be unusal to see a peer with a lot of connections.",
"legendFormat":"max {{dir}} connections per peer –{{instance}}",
"refId":"C"
}
],
"title":"Connections per peer, aggregated",
"type":"timeseries"
},
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"description":"How many peers have N-0.1 connections open",
"fieldConfig":{
"defaults":{
"color":{
"mode":"thresholds"
},
"mappings":[],
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
}
},
"overrides":[]
},
"gridPos":{
"h":8,
"w":12,
"x":0,
"y":76
},
"id":39,
"options":{
"displayMode":"gradient",
"minVizHeight":10,
"minVizWidth":0,
"orientation":"auto",
"reduceOptions":{
"calcs":[
"last"
],
"fields":"",
"values":false
},
"showUnfilled":true
},
"pluginVersion":"9.3.6",
"targets":[
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"exemplar":false,
"expr":"sum without (instance) (libp2p_rcmgr_peer_connections_bucket{dir=\"inbound\",instance=~\"$instance\"}-libp2p_rcmgr_previous_peer_connections_bucket{dir=\"inbound\",instance=~\"$instance\"})",
"format":"heatmap",
"hide":false,
"interval":"",
"legendFormat":"{{le}}",
"refId":"A"
}
],
"title":"Current inbound connections per peer histogram. Across all instances",
"type":"bargauge"
},
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"description":"How many peers have N-0.1 connections open",
"fieldConfig":{
"defaults":{
"color":{
"mode":"thresholds"
},
"mappings":[],
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
}
},
"overrides":[]
},
"gridPos":{
"h":8,
"w":12,
"x":12,
"y":76
},
"id":40,
"options":{
"displayMode":"gradient",
"minVizHeight":10,
"minVizWidth":0,
"orientation":"auto",
"reduceOptions":{
"calcs":[
"last"
],
"fields":"",
"values":false
},
"showUnfilled":true
},
"pluginVersion":"9.3.6",
"targets":[
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"exemplar":false,
"expr":"sum without (instance) (libp2p_rcmgr_peer_connections_bucket{dir=\"outbound\",instance=~\"$instance\"}-libp2p_rcmgr_previous_peer_connections_bucket{dir=\"outbound\",instance=~\"$instance\"})",
"format":"heatmap",
"hide":false,
"interval":"",
"legendFormat":"{{le}}",
"refId":"A"
}
],
"title":"Curent outbound connections per peer histogram. Across all instances",
"description":"As reported to the resource manager",
"fieldConfig":{
"defaults":{
"color":{
"mode":"palette-classic"
},
"custom":{
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"drawStyle":"line",
"fillOpacity":0,
"gradientMode":"none",
"hideFrom":{
"legend":false,
"tooltip":false,
"viz":false
},
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{
"type":"linear"
},
"showPoints":"auto",
"spanNulls":false,
"stacking":{
"group":"A",
"mode":"none"
},
"thresholdsStyle":{
"mode":"off"
}
},
"mappings":[],
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
},
"unit":"bytes"
},
"overrides":[
{
"matcher":{
"id":"byName",
"options":"Number of peers aggregated"
},
"properties":[
{
"id":"color",
"value":{
"fixedColor":"dark-purple",
"mode":"fixed"
}
},
{
"id":"custom.axisPlacement",
"value":"right"
}
]
}
]
},
"gridPos":{
"h":10,
"w":24,
"x":0,
"y":102
},
"id":59,
"options":{
"legend":{
"calcs":[],
"displayMode":"list",
"placement":"bottom",
"showLegend":true
},
"tooltip":{
"mode":"single",
"sort":"none"
}
},
"targets":[
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"exemplar":true,
"expr":"histogram_quantile(0.50, sum by (le) (libp2p_rcmgr_peer_memory_bucket{instance=~\"$instance\"} - libp2p_rcmgr_previous_peer_memory_bucket{instance=~\"$instance\"})) - 0.1",
"hide":false,
"interval":"",
"legendFormat":"p50 memory usage per peer",
"refId":"A"
},
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"exemplar":true,
"expr":"histogram_quantile(0.90, sum by (le) (libp2p_rcmgr_peer_memory_bucket{instance=~\"$instance\"} - libp2p_rcmgr_previous_peer_memory_bucket{instance=~\"$instance\"})) - 0.1",
"hide":false,
"interval":"",
"legendFormat":"p90 memory usage per peer",
"refId":"B"
},
{
"datasource":{
"type":"prometheus",
"uid":"${DS_PROMETHEUS}"
},
"exemplar":true,
"expr":"histogram_quantile(1, sum by (le) (libp2p_rcmgr_peer_memory_bucket{instance=~\"$instance\"} - libp2p_rcmgr_previous_peer_memory_bucket{instance=~\"$instance\"})) - 0.1",