Nethermind metrics can be consumed by Prometheus/Grafana if configured in Metrics configuration category.
Metrics can be enabled by simply passing --Metrics.Enabled true
argument to the Docker containers,Nethermind.Runner
or Nethermind.Launcher
e.g. ./Nethermind.Runner --Metrics.Enabled true
.
Metrics.PushGatewayUrl
will need to be amended if pushgateway endpoint is not default.
clone metrics-infrastructure repository
git clone https://github.com/NethermindEth/metrics-infrastructure.git
go to metrics-infrastructure
directory
cd metrics-infrastructure
run docker stack
docker-compose up -d
Prometheus instance should be now running on http://localhost:9090/
Pushgateway on http://localhost:9091/
Grafana on http://localhost:3000/
run the Nethermind
node with Metrics
enabled and you should see metrics inflowing on Pushgateway url
You can add nethermind service to the docker-compose.yml
file so that it runs with the whole stack
nethermind:image: nethermind/nethermindcontainer_name: nethermindrestart: unless-stoppedcommand: '--config goerli --Metrics.Enabled true'network_mode: hostvolumes:- ./nethermind_db/:/nethermind/nethermind_db/- ./keystore/:/nethermind/keystore/- ./logs/:/nethermind/logs/
./Nethermind.Runner --Metrics.Enabled true
./Nethermind.Launcher --Metrics.Enabled true
docker run -it --network host nethermind/nethermind:alpine --Metrics.Enabled
open Grafana url and login with default login (admin) and password (admin), skip password change if you want
go to dashboards management http://localhost:3000/dashboards
and click Nethermind
you can now explore metrics and monitor your Nethermind node