Guide on how to monitor Peers In connections on Grafana

Hello there o/

While setting up my Grafana Dahsboards a little while ago, i couldn’t find any “Connected peers IN” metrics, out of the box. So i wrote a little and simple script that can do that, and export it to Prometheus every minute.

I though someone else might be interested, so i wrote a guide on my pool Blog there :

It’s certainly not perfect, but well, it works :slight_smile:


Thanks. I had been looking for something like this.

1 Like

You’re welcome :slight_smile:

When running in P2P mode, you can get some really nice stats directly from the node, obviating the need for tcp connection analysis with a tool like ss.:

curl -s -H 'Accept: application/json' http:/localhost:12788 | jq '.cardano.node.metrics.connectionManager'
  "duplexConns": {
    "type": "g",
    "val": 4
  "incomingConns": {
   "type": "g",
   "val": 19
  "outgoingConns": {
    "type": "g",
    "val": 50
  "prunableConns": {
    "type": "g",
    "val": 1
  "unidirectionalConns": {
    "type": "g",
    "val": 64

You can then plug that directly into Grafana.

I can’t wait for P2P to be fully rolled out.


Nice one, thanks for sharing