NEXUS

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:

  1. Add Prometheus as a data source in Grafana.
  2. Import an Ethereum client dashboard template:
    https://grafana.com/grafana/dashboards/13877-single-geth-dashboard/
  3. 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 load
  • system/cpu/syswait: CPU wait time
  • system/cpu/procload: Process CPU load
  • system/memory/used: Memory usage
  • system/disk/readdata, system/disk/writedata: Disk I/O

2. Blockchain Metrics

Track chain state and processing stats:

  • chain/head/block: Current block height
  • chain/head/header: Current header height
  • chain/head/finalized: Finalized block height
  • chain/execution: Block execution time
  • chain/validation: Block validation time
  • chain/write: Block write time

3. P2P Network Metrics

Monitor network communication status:

  • p2p/peers: Number of connected peers
  • p2p/dials/success: Successful dial attempts
  • p2p/egress: Outbound traffic
  • p2p/ingress: Inbound traffic

4. Transaction Pool Metrics

Track transaction processing status:

  • txpool/pending: Pending transactions
  • txpool/valid: Valid transactions
  • txpool/invalid: Invalid transactions
  • txpool/underpriced: Underpriced transactions
  • txpool/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 fee
  • blobpool/blobfee: Blob fee
  • blobpool/add/valid: Valid blob additions
  • blobpool/drop/invalid: Dropped invalid blobs

Monitoring Best Practices

Essential Metrics to Monitor

It is recommended to monitor the following key metrics:

  1. System resources: CPU, memory, disk usage
  2. Chain state: Block height, sync status
  3. Network state: Peer count, traffic
  4. Transaction processing: Tx pool state, throughput

Alert Configuration

Set up alerts for critical events:

  1. Node downtime or sync issues
  2. Threshold exceeded for resource usage (CPU, memory, disk)
  3. Drop in peer count
  4. 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.


© 2025 NEXUS Co., Ltd. All Rights Reserved.