Module 6. Monitoring the nodes
The Cardano node provides crucial metrics about itself and the network, making them available for Prometheus and EKG. This tutorial explains how to set up a well-designed dashboard to monitor your nodes.
Prometheus and node exporter
A reasonable monitoring setup looks as follows, with a dedicated monitoring server responsible for scraping and collecting data from all the nodes, which makes it accessible for a Grafana dashboard:
Configuring the Cardano node to export metrics
First, configure your nodes to export metrics to Prometheus:
Turn on the log metrics setting its value to 'true'
Set the listening port for
hasPrometheus
. The default value is 127.0.0.1. Change the value to 0.0.0.0 so that it can accept connections from the monitoring server. You can use any port you want, the example goes with the default 12798:
Installing the Prometheus node exporter (optional)
The Prometheus node exporter can be useful as well. To install the node exporter, see the documentation below:
Copy the
node_exporter
executable to/usr/local/bin/
:
Configure the node exporter as a systemd
unit:
Start the node exporter:
Update firewall rules to allow connections to port 12798 (to access your cardano-node metrics) and 9100 (the default port for node-exporter).
Installing Prometheus on the monitoring server
Configure Prometheus:
Run Prometheus:
Setting up a Grafana dashboard
There are two options:
In either case:
Configure Grafana: https://prometheus.io/docs/visualization/grafana/
Last updated