13 releases

new 0.1.10 Jul 8, 2024
0.1.9 Jun 4, 2024
0.1.7 May 20, 2024
0.1.5-alpha.1 Apr 24, 2024
0.1.1 Feb 28, 2024

#3 in #grafana

Download history 25/week @ 2024-03-11 15/week @ 2024-03-18 206/week @ 2024-04-01 179/week @ 2024-04-08 99/week @ 2024-04-15 99/week @ 2024-04-22 13/week @ 2024-04-29 170/week @ 2024-05-06 162/week @ 2024-05-13 175/week @ 2024-05-20 14/week @ 2024-05-27 321/week @ 2024-06-03 8/week @ 2024-06-10

332 downloads per month

GPL-3.0 license

15KB
199 lines

Safe Network Metrics Dashboard

Easily visualize metrics from Safe Network nodes using Prometheus and Grafana. This guide covers the steps to set up the dashboard and terminate it.

Prerequisites

  1. Docker & Docker-Compose: Ensure you have both docker and docker-compose installed on your system and make sure they're running.
  2. Safe Node Configuration: When running your Safe nodes, ensure they are started with the --feature=open-metrics flag.

1. Start the Dashboard:

Manual Start:

Run the following command to scan the log files and fetch the metrics server URLs. These URLs will be used to create the Prometheus config file.

cargo run --release --bin metrics -- [log_dir_path]...

Note: If [log_dir_path]... is not provided, it will default to the data-dir log that nodes use by default.

The above command would write the Prometheus config file to ./metrics/prometheus/prometheus.yml

  • Navigate to the metrics directory:
cd metrics
  • Start the containers:
docker-compose up --detach

Automated Start:

Run the binary with the --run flag to fetch the configuration file and automatically start the containers:

cargo run --release --bin metrics -- [log_dir_path]... --run

2. Access the Dashboard:

Once started, access the Grafana dashboard at: http://localhost:3001/d/node_metrics/node-metrics?orgId=1&refresh=5s

Login Credentials:

username: admin
password: pwd

3. Terminate the Dashboard:

To stop the containers and clear all the data:

cd metrics
docker-compose down --volumes

Dependencies

~10–20MB
~300K SLoC