Skip to content

Latest commit

 

History

History
149 lines (114 loc) · 5.45 KB

README.md

File metadata and controls

149 lines (114 loc) · 5.45 KB

Mina Performance Dashboard

Mina Performance Dashboard is a performance monitoring tool for Mina Protocol. It provides two functions, collecting and visualizing Block Producers' and Snarkers' performance data.

1. Features

  • Block Producer Performance Dashboard
  • Snarker Performance Dashboard

1-1. Screenshot

screenshot_dark_1 screenshot_dark_2 screenshot_light_1 screenshot_light_2

2. Install Guide

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.

2.1. Preparations

2.1.1. Install Docker

Prometheus and Grafana provides service through Docker.

apt install docker.io

2.1.2. Firewall Setting

  • Mina node
    • Open inbound 6060(Mina Metric) port from PROMETHEUM Server
    • Open inbound 9100(node_exporter) port from PROMETHEUM Server
  • Prometheum and Grafana Server
    • Open inbound 3000(Grafana) and 9090(Prometheum) port

2.2. Install Prometheus

2.2.2. Configure Prometheus

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.

2.2.3. Run Prometheus through Docker

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 prometheus

2.3. Install Grafana

2.3.1 Install and run Grafana

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.

2.3.1 Configure Grafana

Login to Grafana

  • Visit : http://GRAFANA_IP_ADDRESS:3000

You can login to Grafana with username admin and default password admin. 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
  • Click [Save & Test]

screenshot_light_3

Add a dashboard from template

screenshot_light_4

Now, you can see the dashboard

  • Dashboard > Home > Mina:BlockProducer Performance Dashboard

3. Automated Alerts sent to Telegram bot

4. Reference