A Prometheus-based monitoring tool for Aztec Sequencer nodes.
This tool monitors multiple Aztec nodes and exports the following metrics:
- aztec_node_status: Health status of Aztec node (1=healthy, 0=unhealthy)
- aztec_latest_number: Latest block number on Aztec L2
- aztec_proven_number: Latest proven block number on Aztec L2
- aztec_finalized_number: Latest finalized block number on Aztec L2
- address_l1_balance: L1 ETH balance of the monitored address
- aztec_p2p_status: P2P TCP port connectivity status (1=connected, 0=disconnected)
All metrics include the following labels:
host_name
: Name of the monitored hosthost_ip
: IP address of the monitored hostnode_version
: Version of the Aztec nodel1_chain_id
: L1 chain IDaddress
: Monitored Ethereum address
# Clone the repository
git clone https://github.com/ronnynth/aztecmonitor.git
cd aztecmonitor
# Download dependencies
go mod download
# Build the binary
go build -o aztecmonitor
Create a config.yaml
file based on the example:
server:
http_port: 3008 # Port for metrics and health endpoints
pprof_port: 6068 # Port for pprof debugging
aztec:
- host_ip: "127.0.0.1"
host_name: "aztec-node-01"
rpc_port: 8080
tcp_port: 40400
address: "0x1234567890123456789012345678901234567890"
l1_chain_rpc: "https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY"
check_second: 30
- host_ip: "192.168.1.100"
host_name: "aztec-node-02"
rpc_port: 8080
tcp_port: 40400
address: "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"
l1_chain_rpc: "https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY"
check_second: 30
http_port
: Port for metrics and health endpoints (default: 3008)pprof_port
: Port for pprof debugging endpoint (default: 6068)
host_ip
: IP address of the Aztec nodehost_name
: Friendly name for the node (used in metrics labels)rpc_port
: JSON-RPC port of the Aztec node (default: 8080)tcp_port
: P2P TCP port to check connectivity (default: 40400)address
: Ethereum address to monitor L1 balancel1_chain_rpc
: L1 Ethereum RPC endpoint for balance checkscheck_second
: Check interval in seconds (default: 30)
# Run with custom config file
./aztecmonitor -conf /path/to/config.yaml
# Enable verbose logging
./aztecmonitor -logtostderr=true -v=5
The metrics are exposed on port 3008
at the /metrics
endpoint:
http://localhost:3008/metrics
scrape_configs:
- job_name: 'aztec-nodes'
static_configs:
- targets: ['localhost:3008']
scrape_interval: 30s
metrics_path: /metrics
Import the included grafana-dashboard.json
to visualize the metrics in Grafana.
The monitor uses the following Aztec node API endpoints:
- node_getNodeInfo: Retrieves node version and L1 chain ID
- node_isReady: Checks if the node is ready and healthy
- node_getL2Tips: Gets latest, proven, and finalized block numbers
- eth_getBalance: Queries L1 balance (via L1 RPC endpoint)
A health check endpoint is available at:
http://localhost:3008/health
For debugging, a pprof server is available at:
http://localhost:6068/debug/pprof/
- Go 1.23.6 or later
- Access to Aztec node RPC endpoints
- Access to L1 Ethereum RPC endpoint (for balance monitoring)