πŸ“Š Grafana / Prometheus / Alerting

🧭 Overview

Monitoring is an essential part of validator operations. We use Prometheus for metrics collection, Grafana for visualization, and Alertmanager (or simple alert scripts) for real-time notifications about node health, performance, and uptime.


Prometheus Setup

1. Install Prometheus

sudo useradd --no-create-home --shell /bin/false prometheus
sudo mkdir /etc/prometheus /var/lib/prometheus
sudo apt update
sudo apt install prometheus -y

On some systems, you may prefer to install manually for full control:

wget https://github.com/prometheus/prometheus/releases/latest/download/prometheus-*.linux-amd64.tar.gz
tar xvf prometheus-*.tar.gz
sudo mv prometheus*/prometheus prometheus*/promtool /usr/local/bin/
sudo mv prometheus*/consoles prometheus*/console_libraries /etc/prometheus/

2. Configure Prometheus

Edit the configuration file:

sudo nano /etc/prometheus/prometheus.yml

Example configuration:

3. Start Prometheus

Access via browser: πŸ‘‰ http://your-server-ip:9090


Node Exporter (System Metrics)

Install Node Exporter β€” collects CPU, memory, and disk usage metrics.

Create a systemd service:

Check in browser: πŸ‘‰ http://your-server-ip:9100/metrics


Grafana Setup

1. Install Grafana

2. Start and enable Grafana

Access Grafana via browser: πŸ‘‰ http://your-server-ip:3000 Default credentials: admin / admin (you’ll be prompted to change it after first login)

3. Add Prometheus as a data source

  • Open Grafana β†’ βš™οΈ Configuration β†’ Data Sources β†’ Add data source

  • Choose Prometheus

  • Set URL: http://localhost:9090

  • Click Save & Test


Alerting Configuration

Option 1 β€” Prometheus Alertmanager

Install Alertmanager:

Create configuration:

Example (email alert):

Add rule to Prometheus:

Example alert rule (/etc/prometheus/alerts.yml):

Restart Prometheus to apply changes:

Option 2 β€” Simple Script Alerts (Lightweight)

For validators without full Alertmanager setup:

You can schedule this via cron:


🧠 Summary

  • Prometheus β€” collects metrics

  • Node Exporter β€” system resource monitoring

  • Grafana β€” visualization dashboards

  • Alertmanager / Scripts β€” notifications on performance issues

This stack provides full observability for your validator infrastructure β€” from performance and uptime to alerts and trends.

Last updated