Browse Source

rcmgr: add libp2p prefix to all metrics (#2063)

gitignore-qlog
Marten Seemann 2 years ago
committed by GitHub
parent
commit
313b080ea4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 52
      p2p/host/resource-manager/obs/grafana-dashboards/resource-manager.json
  2. 2
      p2p/host/resource-manager/obs/stats.go

52
p2p/host/resource-manager/obs/grafana-dashboards/resource-manager.json

@ -168,7 +168,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rate(rcmgr_blocked_resources[$__rate_interval])", "expr": "rate(libp2p_rcmgr_blocked_resources[$__rate_interval])",
"interval": "", "interval": "",
"legendFormat": "", "legendFormat": "",
"refId": "A" "refId": "A"
@ -273,7 +273,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rcmgr_streams{scope=\"system\"}", "expr": "libp2p_rcmgr_streams{scope=\"system\"}",
"interval": "", "interval": "",
"legendFormat": "{{dir}} {{instance}}", "legendFormat": "{{dir}} {{instance}}",
"refId": "A" "refId": "A"
@ -365,7 +365,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rcmgr_streams{scope=\"transient\"}", "expr": "libp2p_rcmgr_streams{scope=\"transient\"}",
"interval": "", "interval": "",
"legendFormat": "{{dir}} {{instance}}", "legendFormat": "{{dir}} {{instance}}",
"refId": "A" "refId": "A"
@ -458,7 +458,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rcmgr_streams{scope=\"protocol\"}", "expr": "libp2p_rcmgr_streams{scope=\"protocol\"}",
"interval": "", "interval": "",
"legendFormat": "{{dir}} {{protocol}} {{instance}}", "legendFormat": "{{dir}} {{protocol}} {{instance}}",
"refId": "A" "refId": "A"
@ -551,7 +551,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "histogram_quantile(0.50, (rcmgr_peer_streams_bucket - rcmgr_previous_peer_streams_bucket)) - 0.1", "expr": "histogram_quantile(0.50, (libp2p_rcmgr_peer_streams_bucket - libp2p_rcmgr_previous_peer_streams_bucket)) - 0.1",
"interval": "", "interval": "",
"legendFormat": "p50 {{dir}} streams per peer – {{instance}}", "legendFormat": "p50 {{dir}} streams per peer – {{instance}}",
"refId": "A" "refId": "A"
@ -562,7 +562,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "histogram_quantile(0.90, (rcmgr_peer_streams_bucket - rcmgr_previous_peer_streams_bucket)) - 0.1", "expr": "histogram_quantile(0.90, (libp2p_rcmgr_peer_streams_bucket - libp2p_rcmgr_previous_peer_streams_bucket)) - 0.1",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "p90 {{dir}} streams per peer – {{instance}}", "legendFormat": "p90 {{dir}} streams per peer – {{instance}}",
@ -574,7 +574,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "histogram_quantile(1, (rcmgr_peer_streams_bucket - rcmgr_previous_peer_streams_bucket)) - 0.1", "expr": "histogram_quantile(1, (libp2p_rcmgr_peer_streams_bucket - libp2p_rcmgr_previous_peer_streams_bucket)) - 0.1",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "max {{dir}} streams per peer – {{instance}}", "legendFormat": "max {{dir}} streams per peer – {{instance}}",
@ -641,7 +641,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": false, "exemplar": false,
"expr": "sum without (instance) (rcmgr_peer_streams_bucket{dir=\"inbound\"}-rcmgr_previous_peer_streams_bucket{dir=\"inbound\"})", "expr": "sum without (instance) (libp2p_rcmgr_peer_streams_bucket{dir=\"inbound\"}-libp2p_rcmgr_previous_peer_streams_bucket{dir=\"inbound\"})",
"format": "heatmap", "format": "heatmap",
"hide": false, "hide": false,
"interval": "", "interval": "",
@ -709,7 +709,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": false, "exemplar": false,
"expr": "sum without (instance) (rcmgr_peer_streams_bucket{dir=\"outbound\"}-rcmgr_previous_peer_streams_bucket{dir=\"outbound\"})", "expr": "sum without (instance) (libp2p_rcmgr_peer_streams_bucket{dir=\"outbound\"}-libp2p_rcmgr_previous_peer_streams_bucket{dir=\"outbound\"})",
"format": "heatmap", "format": "heatmap",
"hide": false, "hide": false,
"interval": "", "interval": "",
@ -841,7 +841,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rcmgr_connections{scope=\"system\"}", "expr": "libp2p_rcmgr_connections{scope=\"system\"}",
"interval": "", "interval": "",
"legendFormat": "{{dir}} {{instance}}", "legendFormat": "{{dir}} {{instance}}",
"refId": "A" "refId": "A"
@ -933,7 +933,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rcmgr_connections{scope=\"transient\"}", "expr": "libp2p_rcmgr_connections{scope=\"transient\"}",
"interval": "", "interval": "",
"legendFormat": "{{dir}} {{instance}}", "legendFormat": "{{dir}} {{instance}}",
"refId": "A" "refId": "A"
@ -1051,7 +1051,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "histogram_quantile(0.50, (rcmgr_peer_connections_bucket - rcmgr_previous_peer_connections_bucket)) - 0.1", "expr": "histogram_quantile(0.50, (libp2p_rcmgr_peer_connections_bucket - libp2p_rcmgr_previous_peer_connections_bucket)) - 0.1",
"interval": "", "interval": "",
"legendFormat": "p50 {{dir}} connections per peer – {{instance}}", "legendFormat": "p50 {{dir}} connections per peer – {{instance}}",
"refId": "A" "refId": "A"
@ -1062,7 +1062,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "histogram_quantile(0.90, (rcmgr_peer_connections_bucket - rcmgr_previous_peer_connections_bucket)) - 0.1", "expr": "histogram_quantile(0.90, (libp2p_rcmgr_peer_connections_bucket - libp2p_rcmgr_previous_peer_connections_bucket)) - 0.1",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "p90 {{dir}} connections per peer – {{instance}}", "legendFormat": "p90 {{dir}} connections per peer – {{instance}}",
@ -1074,7 +1074,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "histogram_quantile(1, (rcmgr_peer_connections_bucket - rcmgr_previous_peer_connections_bucket)) - 0.1", "expr": "histogram_quantile(1, (libp2p_rcmgr_peer_connections_bucket - libp2p_rcmgr_previous_peer_connections_bucket)) - 0.1",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "max {{dir}} connections per peer – {{instance}}", "legendFormat": "max {{dir}} connections per peer – {{instance}}",
@ -1141,7 +1141,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": false, "exemplar": false,
"expr": "sum without (instance) (rcmgr_peer_connections_bucket{dir=\"inbound\"}-rcmgr_previous_peer_connections_bucket{dir=\"inbound\"})", "expr": "sum without (instance) (libp2p_rcmgr_peer_connections_bucket{dir=\"inbound\"}-libp2p_rcmgr_previous_peer_connections_bucket{dir=\"inbound\"})",
"format": "heatmap", "format": "heatmap",
"hide": false, "hide": false,
"interval": "", "interval": "",
@ -1209,7 +1209,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": false, "exemplar": false,
"expr": "sum without (instance) (rcmgr_peer_connections_bucket{dir=\"outbound\"}-rcmgr_previous_peer_connections_bucket{dir=\"outbound\"})", "expr": "sum without (instance) (libp2p_rcmgr_peer_connections_bucket{dir=\"outbound\"}-libp2p_rcmgr_previous_peer_connections_bucket{dir=\"outbound\"})",
"format": "heatmap", "format": "heatmap",
"hide": false, "hide": false,
"interval": "", "interval": "",
@ -1318,7 +1318,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rcmgr_memory{scope=\"system\"}", "expr": "libp2p_rcmgr_memory{scope=\"system\"}",
"interval": "", "interval": "",
"legendFormat": "Bytes Reserved", "legendFormat": "Bytes Reserved",
"refId": "A" "refId": "A"
@ -1412,7 +1412,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rcmgr_memory{scope=\"protocol\"}", "expr": "libp2p_rcmgr_memory{scope=\"protocol\"}",
"interval": "", "interval": "",
"legendFormat": "{{protocol}} {{instance}}", "legendFormat": "{{protocol}} {{instance}}",
"refId": "A" "refId": "A"
@ -1506,7 +1506,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rcmgr_memory{scope=\"service\"}", "expr": "libp2p_rcmgr_memory{scope=\"service\"}",
"interval": "", "interval": "",
"legendFormat": "{{service}} {{instance}}", "legendFormat": "{{service}} {{instance}}",
"refId": "A" "refId": "A"
@ -1620,7 +1620,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "histogram_quantile(0.50, sum by (le) (rcmgr_peer_memory_bucket - rcmgr_previous_peer_memory_bucket)) - 0.1", "expr": "histogram_quantile(0.50, sum by (le) (libp2p_rcmgr_peer_memory_bucket - libp2p_rcmgr_previous_peer_memory_bucket)) - 0.1",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "p50 memory usage per peer", "legendFormat": "p50 memory usage per peer",
@ -1632,7 +1632,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "histogram_quantile(0.90, sum by (le) (rcmgr_peer_memory_bucket - rcmgr_previous_peer_memory_bucket)) - 0.1", "expr": "histogram_quantile(0.90, sum by (le) (libp2p_rcmgr_peer_memory_bucket - libp2p_rcmgr_previous_peer_memory_bucket)) - 0.1",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "p90 memory usage per peer", "legendFormat": "p90 memory usage per peer",
@ -1644,7 +1644,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "histogram_quantile(1, sum by (le) (rcmgr_peer_memory_bucket - rcmgr_previous_peer_memory_bucket)) - 0.1", "expr": "histogram_quantile(1, sum by (le) (libp2p_rcmgr_peer_memory_bucket - libp2p_rcmgr_previous_peer_memory_bucket)) - 0.1",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "max memory usage per peer", "legendFormat": "max memory usage per peer",
@ -1657,7 +1657,7 @@
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": true, "exemplar": true,
"expr": "sum(rcmgr_peer_memory_count-rcmgr_previous_peer_memory_count)", "expr": "sum(libp2p_rcmgr_peer_memory_count-libp2p_rcmgr_previous_peer_memory_count)",
"hide": false, "hide": false,
"instant": false, "instant": false,
"interval": "", "interval": "",
@ -1766,7 +1766,7 @@
"uid": "${DS_PROMETHEUS}" "uid": "${DS_PROMETHEUS}"
}, },
"exemplar": true, "exemplar": true,
"expr": "rcmgr_fds", "expr": "libp2p_rcmgr_fds",
"interval": "", "interval": "",
"legendFormat": "{{scope}} {{instance}}", "legendFormat": "{{scope}} {{instance}}",
"refId": "A" "refId": "A"
@ -1777,7 +1777,7 @@
} }
], ],
"refresh": false, "refresh": false,
"schemaVersion": 37, "schemaVersion": 38,
"style": "dark", "style": "dark",
"tags": [], "tags": [],
"templating": { "templating": {
@ -1793,4 +1793,4 @@
"uid": "MgmGIjjnj", "uid": "MgmGIjjnj",
"version": 1, "version": 1,
"weekStart": "" "weekStart": ""
} }

2
p2p/host/resource-manager/obs/stats.go

@ -9,7 +9,7 @@ import (
) )
var ( var (
metricNamespace = "rcmgr" metricNamespace = "libp2p_rcmgr"
// Conns // Conns
conns = prometheus.NewGaugeVec(prometheus.GaugeOpts{ conns = prometheus.NewGaugeVec(prometheus.GaugeOpts{

Loading…
Cancel
Save