Grafana Dashboard for Peer Analysis

Hello everyone, I’m a newbie to pool operations. My setup is based on IOHK-released docker images. I’m using a useful Grafana dashboard to monitor my nodes.

In the early days, I also tested cardano-community docker images which has built-in tools. As you know, one of the tools I loved is peer analysis of gLiveView. I would like to make an equivalent of this pane with Grafana. I did some research and I couldn’t find how this analysis is made. Is there any ready-to-use dashboard or any information about peer analysis procedure?

Thanks in advance.


I have it but only for OUT peers connected



But I guess u don’t want only the counters…


Hi Alex, the dashboard I used also has something like that. However, I would like to add a new dashboard or new pane to the existing dashboard so that I can view connection- or peer-wise details. For example, in my topology file, 20 connection + 1 core connection is listed, but 3 of them is unreachable or unavailable at the time of writing. I want to know which one is disconnected, or how many IN connection is established to my relay.



Not sure if you can get every details from gLiveView to grafana, but I personally use this dashboard, with minor modifications

Hi, thanks for sharing. I also have almost the same metrics. I especially focused on IN connection peers. I think I found something. A valuable SP, PANL, shares some tutorials about operating and monitoring nodes. They made some text data extractors, and one of them is IN connection.

I will focus on it :slight_smile:


Hi @Bilge_Mirac_Atici

If I wanted to build that, I would write my own script(s) using the following approach:


As a starting point, in the script the CheckPeers() method includes the following lines to retrieve a list of peers:

peers_in=$(ss -tnp state established 2>/dev/null | grep "${CNODE_PID}," | awk -v port=":${CNODE_PORT}" '$3 ~ port {print $4}')

peers_out=$(ss -tnp state established 2>/dev/null | grep "${CNODE_PID}," | awk -v port=":(${CNODE_PORT}|${EKG_PORT}|${PROM_PORT})" '$3 !~ port {print $4}')


cncli ping command usage is described at cncli/ at develop · cardano-community/cncli · GitHub

Also, the latencyCNCLI () method in the script contains a syntax example for using the cncli ping command if needed:

checkPEER=$(${CNCLI} ping --host "${peerIP}" --port "${peerPORT}" --network-magic "${NWMAGIC}")


In the Grafana Dashboard Tutorial at Grafana Dashboard Tutorial | Cardano Developer Portal that you linked above, the section Add Data from Adapools to the Dashboard explains how to implement a text-file collector using Prometheus to send any numeric data that you want to Grafana, such as results of peer analysis that you may perform.


The following page contains useful information on how to test the text-file collector using Prometheus:

If the data that you collect is available in Prometheus, then expect the same data to be available in Grafana for display in your dashboard.

Automate running the script to refresh the peer analysis on a regular schedule by implementing a cron job or service.

Have fun,


1 Like

It’s such a comprehensive reply, and thank you so much for the guidance. I also found that ss based script also would work for me. I will implement text-file collector for this data. I’ll share my progress. Bests.