Mina Performance Dashboard is a performance monitoring tool for Mina Protocol. It provides two functions, collecting and visualizing Block Producers' and Snarkers' performance data.
- Block Producer Performance Dashboard
- Snarker Performance Dashboard
The Mina Performance Dashboard displays information of nodes through Prometheus and Grafana. Also, server information is collected using node_exporter.
You have to prepare 2 servers. Of course, you can install everything on one server. But it is not recommended.
- Mina Node
- Install Mina node : https://minaprotocol.com/docs/getting-started
- Install node_exporter : https://github.com/prometheus/node_exporter#using-docker
- Prometheum and Grafana Server
- Install Prometheus :
2.2. Install Prometheus
- Install Grafana :
2.3. Install Grafana
- Install Prometheus :
Prometheus and Grafana provides service through Docker.
apt install docker.io
- Mina node
- Open inbound
6060
(Mina Metric) port from PROMETHEUM Server - Open inbound
9100
(node_exporter) port from PROMETHEUM Server
- Open inbound
- Prometheum and Grafana Server
- Open inbound
3000
(Grafana) and9090
(Prometheum) port
- Open inbound
Create the Prometheum configuration file.
vi /tmp/prometheus-mina.yml
Paste the contents of the file below. At this time, change NODE_IP_ADDRESS
to your own IP address.
global:
scrape_interval: 15s # 15s will be enough, because block of time
scrape_timeout: 15s
evaluation_interval: 15s # Evaluate alerting
alerting:
alertmanagers:
- static_configs:
- targets: []
scheme: http
timeout: 5s
scrape_configs:
- job_name: 'mina-testnet'
metrics_path: /metrics
scheme: http
static_configs:
- targets: ['NODE_IP_ADDRESS:6060','NODE_IP_ADDRESS:9100'] ## Replace NODE_IP_ADDRESS to IP address of your server
labels:
hostname: 'mina-daemon'
You can also get this file prometheus-mina.yml here.
docker run \
-d --name=prometheus-mina \
-p 9090:9090 \
-v /tmp/prometheus-mina.yml:/etc/prometheus/prometheus.yml \
prom/prometheus
Check Prometheus : http://PROMETHEUS_IP_ADDRESS:9090
Run Grafana through Docker
docker run \
-d \
-p 3000:3000 \
--name=grafana \
-e "GF_INSTALL_PLUGINS=fifemon-graphql-datasource" \
grafana/grafana
Add plugin(fifemon-graphql-datasource) :
-e "GF_INSTALL_PLUGINS=fifemon-graphql-datasource"
it makes GraphQL data available to Grafana.
Login to Grafana
- Visit :
http://GRAFANA_IP_ADDRESS:3000
You can login to Grafana with username
admin
and default passwordadmin
. After you connect to Grafana for the first time, you will see a screen to set new password for your account.
Add data source
Configuration > Data Sources > Add data source > Prometheus
- Type it below
- Name :
Prometheus-Mina
- HTTP > URL :
http://PROMETHEUS_IP_ADDRESS:9090
- Name :
- Click
[Save & Test]
Add a dashboard from template
- Move to
Create > Import JSON
- Import via grafana.com : 12840
Grafana Dashboard URL : https://grafana.com/grafana/dashboards/12840
- Otherwise Upload a json file as below.
Upload this file : https://github.com/dsrvlabs/mina-performance-dashboard/blob/master/grafana-json-model.json
- Otherwise Upload a json file as below.
- Click :
Load
button
Now, you can see the dashboard
Dashboard > Home > Mina:BlockProducer Performance Dashboard
- Please refer to this link : https://gist.github.com/dl6nm/c312acbc6fddf1a56d749e045f040ca3
- Mina Protocol : https://minaprotocol.com/docs/getting-started
- Prometheus : https://prometheus.io/docs/prometheus/latest/getting_started/
- Prometheus node_exporter : https://github.com/prometheus/node_exporter
- Grafana : https://grafana.com/docs/grafana/latest/
- Grafana Dashbaord : 1 Node Exporter for Prometheus Dashboard EN
- Grafana Dahsboard : Mina: Block Producer Performance Dashboard
- Automated Alerts sent to Telegram bot : https://gist.github.com/dl6nm/c312acbc6fddf1a56d749e045f040ca3