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

1
git clone https://github.com/NethermindEth/metrics-infrastructure.git
Copied!
    go to metrics-infrastructure directory
1
cd metrics-infrastructure
Copied!
    run docker stack
1
docker-compose up -d
Copied!
    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
1
nethermind:
2
image: nethermind/nethermind
3
container_name: nethermind
4
restart: unless-stopped
5
command: '--config goerli --Metrics.Enabled true'
6
network_mode: host
7
volumes:
8
- ./nethermind_db/:/nethermind/nethermind_db/
9
- ./keystore/:/nethermind/keystore/
10
- ./logs/:/nethermind/logs/
Copied!
Runner
Launcher
Docker
1
./Nethermind.Runner --Metrics.Enabled true
Copied!
1
./Nethermind.Launcher --Metrics.Enabled true
Copied!
1
docker run -it --network host nethermind/nethermind:alpine --Metrics.Enabled
Copied!
Could not load image
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

GitHub - prometheus/prometheus: The Prometheus monitoring system and time series database.
GitHub
Prometheus GitHub
GitHub - prometheus/pushgateway: Push acceptor for ephemeral and batch jobs.
GitHub
Pushgateway GitHub
GitHub - grafana/grafana: The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
GitHub
Grafana GitHub
Last modified 9mo ago