Links

Setting up local Metrics infrastructure

Metrics then can be used to monitor your running Nethermind nodes

Metrics Configuration

Nethermind metrics can be consumed by Prometheus/Grafana if configured in Metrics configuration category.

Metrics infrastructure

Enabling Metrics in Nethermind

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.

Running sample configuration

git clone https://github.com/NethermindEth/metrics-infrastructure.git
  • go to metrics-infrastructure directory
cd metrics-infrastructure
  • run docker stack
docker-compose up -d
  • 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/nethermind
container_name: nethermind
restart: unless-stopped
command: '--config goerli --Metrics.Enabled true'
network_mode: host
volumes:
- ./nethermind_db/:/nethermind/nethermind_db/
- ./keystore/:/nethermind/keystore/
- ./logs/:/nethermind/logs/
Runner
Launcher
Docker
./Nethermind.Runner --Metrics.Enabled true
./Nethermind.Launcher --Metrics.Enabled true
docker run -it --network host nethermind/nethermind:alpine --Metrics.Enabled
http://localhost:9091/
  • open Grafana url and login with default login (admin) and password (admin), skip password change if you want
  • you can now explore metrics and monitor your Nethermind node

Prometheus, Pushgateway and Grafana sources