Real-time blockchain monitoring and analytics for Ethereum consensus properties using Lighthouse, Prometheus, InfluxDB v3, Telegraf, and Grafana. Developed for the course "Blockchain Programming" at University of Zurich using the official UZH ETH PoS Node.
This project provides a real-time blockchain monitoring dashboard to analyze Lighthouse's consensus properties. It integrates Lighthouse's Prometheus metrics with a full monitoring stack:
| Technology | Role |
|---|---|
| Lighthouse | Ethereum consensus layer client providing validator metrics |
| Prometheus | Scrapes blockchain metrics and provides time-series data |
| InfluxDB v3 | High-performance time-series database |
| Telegraf | Ingests Prometheus metrics and forwards them to InfluxDB |
| Grafana | Provides real-time visualization of blockchain metrics |
git clone https://gitlab.uzh.ch/sandrinraphael.hunkeler/blockchainseminar.git
cd blockchainseminar2.1 Create secret files:
mkdir -p secrets
touch secrets/.env.influxdb3-api-token
touch secrets/.env.wallet-address2.2 Store influxdb3 token:
# Open secret file
nano secrets/.env.influxdb3-api-token# Insert valid (but insecure) api-token
apiv3_2ueuF0QKTzyXivh5wIshOllJk1mdstJDZ3h2XNho88rSgUWElA9a2yYQ1X56kUOXlaTk_R425EaScVPwMsCitQ# OR (optional) generate one *after* deploying influxdb
docker exec -it influxdb3 bash
influxdb3 create token
# Copy token and insert it into secret file
# Requires restart of telegraf container2.3 Store Ethereum wallet address:
# Open secret file
# Insert valid ethereum wallet address 0x4f...
nano secrets/.env.wallet-addresssudo apt update && sudo apt upgrade -ysudo systemctl enable containerd.service
sudo systemctl start dockerdocker compose buildCaution
If you are on a Apple Silicon Mac, change the following lines in the docker-compose.yml and eth-node Dockerfile:
Add platform in docker-compose.yml:
eth-node:
build: eth-node
platform: linux/amd64 # <-- add this
container_name: eth-nodeChange tag in eth-node/Dockerfile:
FROM amd64/ubuntu:22.04 # instead of FROM ubuntu:latestdocker compose upcurl -s http://localhost:5052/metrics | head -n 20async_tasks_count{async_task_count="fork_choice_advance"} 0
async_tasks_count{async_task_count="http-api"} 1| Service | URL |
|---|---|
| Grafana | http://localhost:3000 |
| InfluxDB | http://localhost:8086 |
For remote virtual machines, the ports must be forwarded to the localhost.
docker compose up -ddocker compose downdocker compose logs -fdocker compose restart <service_name>docker compose build --no-cache --progress=plaindocker system prune -a --volumes -f