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 :
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.: