| title | Prometheus Setup |
|---|---|
| description | Configure Prometheus to scrape and store metrics from your Aztec node's OpenTelemetry Collector. |
Prometheus scrapes and stores the metrics exposed by the OTEL collector, providing a time-series database for querying and analysis.
- Completed OpenTelemetry Collector Setup
- OTEL collector running and exposing metrics on port 8889
Create a prometheus.yml file:
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'aztec-node'
static_configs:
- targets: ['otel-collector:8889']
labels:
instance: 'aztec-node-1'If you're running multiple nodes, adjust the instance label to uniquely identify each node.
Add Prometheus to your docker-compose.yml:
services:
# ... existing services (otel-collector, etc.) ...
prometheus:
image: prom/prometheus:latest
container_name: aztec-prometheus
ports:
- 9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=30d'
networks:
- aztec
restart: always
volumes:
prometheus-data:docker compose up -dAccess Prometheus UI at http://localhost:9090 and verify:
- Go to Status → Targets to check that the
aztec-nodetarget is up - Go to Graph and query a metric (e.g.,
aztec_archiver_block_height)
Use the Prometheus UI to explore and query metrics:
- Navigate to
http://localhost:9090/graph - Enter a metric name in the query box (use autocomplete to discover available metrics)
- Click Execute to see the results
- Switch between Table and Graph views
# Current block height
aztec_archiver_block_height
# Blocks synced over time window
increase(aztec_archiver_block_height[5m])
# Memory usage
process_resident_memory_bytes
# CPU usage rate
rate(process_cpu_seconds_total[5m])
- Proceed to Grafana Setup to configure visualization and alerting
- Return to Monitoring Overview