Monitoring
CROSS Chain provides a wide range of metrics and monitoring tools to track network status, performance, and resource usage in real time. This document outlines how to configure monitoring for CROSS nodes and describes the available metrics.
How to Enable Monitoring
To enable metric collection on a CROSS node, use the following flags:
# Enable basic metrics
geth --metrics
# Enable detailed (expensive) metrics
geth --metrics --metrics.expensive
# Expose metrics via HTTP (default port: 6060)
geth --metrics --metrics.addr <IP_ADDRESS> --metrics.port <PORT>
Alternatively, you can enable metrics via environment variables:
export GETH_METRICS=true
export GETH_METRICS_EXPENSIVE=true
Prometheus Integration
Prometheus is a time-series database used for collecting metrics and setting up alerts. To collect metrics from a CROSS node, configure your Prometheus server as follows:
scrape_configs:
- job_name: 'cross'
scrape_interval: 15s
static_configs:
- targets: ['<NODE_IP>:<METRICS_PORT>']
You can also scrape metrics directly from the following endpoint:
http://localhost:6060/debug/metrics/prometheus
Grafana Dashboard Setup
Grafana allows you to visualize metrics collected by Prometheus:
- Add Prometheus as a data source in Grafana.
- Import an Ethereum client dashboard template:
https://grafana.com/grafana/dashboards/13877-single-geth-dashboard/ - Adjust metric queries and customize the dashboard as needed.
Key Metric Categories
CROSS Chain provides metrics in the following categories:
1. System Metrics
Monitor system resource usage:
system/cpu/sysload
: System CPU loadsystem/cpu/syswait
: CPU wait timesystem/cpu/procload
: Process CPU loadsystem/memory/used
: Memory usagesystem/disk/readdata
,system/disk/writedata
: Disk I/O
2. Blockchain Metrics
Track chain state and processing stats:
chain/head/block
: Current block heightchain/head/header
: Current header heightchain/head/finalized
: Finalized block heightchain/execution
: Block execution timechain/validation
: Block validation timechain/write
: Block write time
3. P2P Network Metrics
Monitor network communication status:
p2p/peers
: Number of connected peersp2p/dials/success
: Successful dial attemptsp2p/egress
: Outbound trafficp2p/ingress
: Inbound traffic
4. Transaction Pool Metrics
Track transaction processing status:
txpool/pending
: Pending transactionstxpool/valid
: Valid transactionstxpool/invalid
: Invalid transactionstxpool/underpriced
: Underpriced transactionstxpool/reheap
: Tx pool reorganization time
5. Ethereum Protocol Metrics
Ethereum protocol communication:
eth/sync/processed
: Processed sync data
6. Blobpool Metrics (EIP-4844)
blobpool/basefee
: Base feeblobpool/blobfee
: Blob feeblobpool/add/valid
: Valid blob additionsblobpool/drop/invalid
: Dropped invalid blobs
Monitoring Best Practices
Essential Metrics to Monitor
It is recommended to monitor the following key metrics:
- System resources: CPU, memory, disk usage
- Chain state: Block height, sync status
- Network state: Peer count, traffic
- Transaction processing: Tx pool state, throughput
Alert Configuration
Set up alerts for critical events:
- Node downtime or sync issues
- Threshold exceeded for resource usage (CPU, memory, disk)
- Drop in peer count
- Delayed block processing
Log Monitoring
geth --verbosity 3 # Info-level logging
Log levels:
0=silent
, 1=error
, 2=warn
, 3=info
, 4=debug
, 5=detail
Metric Storage Scaling
For long-term metric analysis, define appropriate retention policies and allocate sufficient storage.
Updated 26 days ago