Skip to main content

📊 Monitoring a Node with Grafana & Prometheus

Monitor blockchain nodes with real-time charts and alerts.


🔹 What You'll Monitor

MetricImportancePrometheus Query
CPU UsageAvoid overloadnode_cpu_seconds_total{mode!="idle"}
RAM UsageDetect memory pressurenode_memory_MemAvailable_bytes
Disk SpacePrevent sync/storage failurenode_filesystem_avail_bytes
Network I/OCheck if syncing and broadcastingnode_network_receive_bytes_total

🔹 Step 1: Install Prometheus

sudo apt update
sudo apt install prometheus

🔹 Step 2: Configure Prometheus

sudo nano /etc/prometheus/prometheus.yml

Edit:

global:
scrape_interval: 15s

scrape_configs:
- job_name: 'node'
static_configs:
- targets: ['localhost:9100']

🔹 Step 3: Install Node Exporter

sudo apt install prometheus-node-exporter

📍 Metrics available at:

http://<your-vps-ip>:9100/metrics

🔹 Step 4: Install Grafana

sudo apt install -y software-properties-common
sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
sudo apt update && sudo apt install grafana -y
sudo systemctl start grafana-server
sudo systemctl enable grafana-server

Access Grafana at:

http://<your-vps-ip>:3000

Login: admin / admin


🔹 Step 5: Connect Grafana to Prometheus

  1. Go to Configuration > Data Sources
  2. Add Prometheus
  3. Set URL: http://localhost:9090
  4. Click Save & Test

🔹 Step 6: Import Node Dashboard

  1. Go to Create > Import
  2. Use ID 1860 for Node Exporter Full
  3. Select your Prometheus data source
  4. Click Import

🎉 Now you're monitoring everything in Grafana!

© 2025 TokioStack. All rights reserved.
DMCA.com Protection Status