Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
LABS
Guides

Setting Up Basic Node Monitoring

A practical guide to implementing a monitoring stack for blockchain nodes. Covers installing Prometheus, Node Exporter, and Grafana to track metrics like CPU, memory, disk usage, and sync status.
Chainscore © 2026
introduction
GETTING STARTED

Setting Up Basic Node Monitoring

Learn the essential steps to monitor your blockchain node's health, performance, and security using open-source tools.

Node monitoring is a foundational practice for any Web3 developer or validator. It involves tracking key metrics like block height synchronization, peer connections, CPU/memory usage, and disk I/O to ensure your node is operating correctly and efficiently. Without monitoring, you risk missing critical failures, performance degradation, or security incidents that could lead to downtime or slashing penalties. A basic setup focuses on collecting, visualizing, and alerting on these core operational telemetry points.

The first step is to instrument your node to expose metrics. Most modern clients, such as Geth, Erigon, Prysm, and Lighthouse, support the Prometheus monitoring format. You typically enable this by adding flags like --metrics and --metrics.addr to your node's startup command. For example, starting a Geth node with --metrics --metrics.addr 0.0.0.0 will expose a /metrics HTTP endpoint. This endpoint serves a plaintext list of all available metrics, which a collector can then scrape at regular intervals.

Next, you need a system to collect and store these metrics. Prometheus is the industry-standard, open-source toolkit for this purpose. You configure Prometheus by writing a prometheus.yml file that defines your node as a scrape target. A minimal job configuration targets your node's metrics endpoint, often on port 6060 or 9091, and pulls data every 15-30 seconds. Prometheus then stores this time-series data locally, allowing you to query it using its powerful PromQL language to create graphs and alerts.

For visualization, Grafana is the preferred tool. It connects directly to your Prometheus data source and allows you to build dashboards with graphs, gauges, and stat panels. A basic node dashboard should include panels for: chain_head_block (current block), p2p_peers (connected peers), process_cpu_seconds_total, process_resident_memory_bytes, and disk_io. These give you an at-a-glance view of your node's health. You can find pre-built dashboards for common clients on the Grafana Dashboards website.

The final component is alerting. Both Prometheus and Grafana can be configured to send notifications when metrics cross critical thresholds. Common alerts include: the node falling more than 100 blocks behind the chain head, peer count dropping to zero, disk usage exceeding 90%, or the process crashing (resulting in no new metrics). You can route these alerts to channels like Discord, Slack, Telegram, or email using the Alertmanager service, which handles deduplication and silencing of alerts.

This basic stack—node exporter, Prometheus, Grafana, and Alertmanager—provides a robust, self-hosted monitoring foundation. It gives you full visibility and control over your node's operational state. For production systems, consider adding logging aggregation with Loki and tracing with Jaeger for deeper diagnostics. Regularly review and tune your alert thresholds to minimize false positives while ensuring you're notified of genuine issues that require immediate intervention.

prerequisites
SETUP GUIDE

Prerequisites and System Requirements

Before deploying a node, you must configure your system's hardware, software, and network to meet the specific demands of blockchain consensus and data propagation.

The foundation of reliable node operation is hardware selection. For mainnet participation, you typically need a machine with at least 4-8 CPU cores, 16-32 GB of RAM, and 1-2 TB of fast SSD storage. For example, running an Ethereum execution client like Geth or an Erigon archive node requires significantly more resources than a Cosmos-based chain's validator. Insufficient RAM will cause out-of-memory crashes during sync, while slow storage will lead to block processing delays and missed attestations.

Your operating system and software environment must be secure and stable. A recent Long-Term Support (LTS) version of Ubuntu Server (22.04 or 24.04) is the standard choice, providing security updates and wide compatibility. Essential system packages include curl, git, build-essential, and ufw for firewall management. You must also install the correct version of golang (e.g., 1.21+) if compiling clients from source, or use Docker for containerized deployment, which simplifies dependency management.

Network configuration is critical for peer discovery and block propagation. Your node requires a static public IP address. You must configure port forwarding on your router for the chain's P2P port (e.g., port 30303 for Ethereum, 26656 for Cosmos). A restrictive firewall (ufw) should only allow inbound traffic on this P2P port and SSH (port 22). Test connectivity using telnet or a public port checker. Residential internet with strict NAT or CGNAT often requires contacting your ISP for a public IP or using a VPS provider like DigitalOcean or AWS.

For monitoring, you need to install the tools that will observe your node. The standard stack includes a time-series database (Prometheus), a visualization layer (Grafana), and an alert manager. You will install the Prometheus Node Exporter to collect system metrics (CPU, memory, disk I/O) and a client-specific exporter (e.g., Geth Exporter, Lighthouse Prometheus metrics) for chain data. Configure these services to start automatically using systemd to ensure they survive reboots and provide continuous visibility.

Finally, establish secure operational practices. Create a dedicated, non-root system user (e.g., nodeoperator) to run your services, limiting potential damage from compromises. Set up SSH key-based authentication and disable password login. Implement a backup strategy for your validator keys and systemd service files. Use a terminal multiplexer like tmux or screen to run long-running processes, allowing you to disconnect and reconnect to your session without stopping the node.

key-concepts-text
KEY MONITORING CONCEPTS

Setting Up Basic Node Monitoring

Learn the essential components and initial steps for monitoring blockchain node health, performance, and security.

Effective node monitoring is built on three foundational pillars: availability, performance, and security. Availability ensures your node is online and synced with the network, which is the absolute baseline for participation. Performance metrics like CPU, memory, and disk I/O usage reveal resource bottlenecks that can cause sync lag or transaction processing delays. Security monitoring tracks peer connections, block propagation times, and potential malicious activity, forming an early warning system for attacks or network instability. Without these metrics, you're operating blind.

The first step is to instrument your node to expose its internal state. Most clients, including Geth, Besu, and Lighthouse, offer a metrics endpoint via the --metrics flag or in their configuration. This exposes a /metrics HTTP endpoint (often on port 8080) that serves data in the Prometheus exposition format. You can verify it's working by running curl http://localhost:8080/metrics. This raw data stream contains hundreds of time-series counters and gauges, such as geth_chain_head_block for the latest block number and geth_p2p_peers for connected peers.

To collect and visualize this data, you need a monitoring stack. The standard open-source combination is Prometheus for scraping/storing metrics and Grafana for dashboards. You configure Prometheus to scrape your node's metrics endpoint at regular intervals (e.g., every 15 seconds). A basic prometheus.yml job configuration targets your node: - job_name: 'geth-node' static_configs: - targets: ['localhost:8080']. Prometheus then pulls the data, allowing you to query it using its powerful PromQL language.

With data flowing into Prometheus, you can build dashboards in Grafana. Start with core visualizations: a graph of chain_head_block to monitor sync status and block production, a gauge for p2p_peers, and time-series graphs for system resources like process_cpu_seconds_total. Setting alerts is crucial; configure Grafana or Prometheus Alertmanager to notify you (e.g., via Slack or email) if the node falls out of sync (abs(delta(chain_head_block[5m])) < 1), peer count drops to zero, or disk usage exceeds 90%. This transforms passive observation into proactive node management.

Beyond the basics, you should monitor chain-specific health indicators. For an Ethereum Execution Client, track eth_gasPrice and transaction pool size (txpool_pending). For a Consensus Client, monitor attestation participation rates and sync committee performance. Also, implement log aggregation using tools like Loki or ELK Stack to parse and alert on critical log lines (e.g., "ERROR", "WARN", "Fork choice" anomalies). This layered approach—metrics, logs, and alerts—provides a comprehensive view of your node's operational integrity.

install-node-exporter
MONITORING FOUNDATION

Step 1: Install and Configure Node Exporter

Node Exporter is the standard Prometheus agent for collecting hardware and OS metrics from Linux/Unix systems, providing the foundational data layer for monitoring your blockchain node's health.

Before deploying any validator or RPC node, establishing a monitoring baseline is critical. Node Exporter exposes a standardized set of metrics about the machine itself, including CPU, memory, disk I/O, network bandwidth, and filesystem usage. These metrics are essential for diagnosing performance bottlenecks, predicting hardware failures, and ensuring your node meets the resource demands of the blockchain client software. Installation is typically done via your system's package manager for simplicity and automatic updates.

For most Linux distributions, you can install Node Exporter directly. On Ubuntu/Debian systems, use sudo apt update && sudo apt install prometheus-node-exporter. For RHEL/CentOS/Fedora, use sudo dnf install prometheus-node-exporter. After installation, enable and start the service with sudo systemctl enable --now node-exporter. The exporter will run on port 9100 by default, serving metrics at the /metrics HTTP endpoint. You can verify it's working by running curl http://localhost:9100/metrics from the command line.

While the default configuration is sufficient for most use cases, you may need to adjust settings via the service's configuration file, often located at /etc/default/prometheus-node-exporter. Key configurations include setting custom listen addresses (e.g., --web.listen-address=:9100) or enabling specific collectors. For blockchain nodes, the diskstats, filesystem, netstat, and systemd collectors are particularly important for tracking disk space for the chain data, network connections, and service status.

Security is a crucial consideration. By default, the metrics endpoint is unauthenticated and accessible to anyone on the network. In a production environment, you should restrict access using a firewall (e.g., ufw or firewalld) to only allow connections from your Prometheus server's IP address. For more advanced setups, consider running Node Exporter behind a reverse proxy with basic authentication or using Prometheus's built-in service discovery and TLS features for secure scraping.

The final step is to integrate Node Exporter with your Prometheus server. Add a new job to your prometheus.yml configuration file under scrape_configs. A basic configuration targets your node's IP and the correct port. Once Prometheus scrapes the metrics, you can begin building dashboards in Grafana using community templates or creating custom alerts for critical thresholds like high memory usage or low disk space, completing your basic node monitoring foundation.

install-prometheus
MONITORING STACK

Step 2: Install and Configure Prometheus

This guide covers the installation and initial configuration of Prometheus, the core time-series database for your node monitoring system.

Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability. It works by scraping metrics from configured targets at regular intervals, evaluating rule expressions, and storing the time-series data in its local database. For node operators, it provides the foundational layer for tracking system health, resource usage, and application-specific metrics from clients like Geth or Erigon. Installation is typically done via package managers for simplicity and easy updates.

On Ubuntu/Debian systems, you can install Prometheus directly from the official repositories. First, update your package list with sudo apt update. Then, install the package using sudo apt install prometheus. After installation, the prometheus service will be automatically started and enabled to run on boot. You can verify it's running with sudo systemctl status prometheus. The default configuration file is located at /etc/prometheus/prometheus.yml, which we will modify next.

The prometheus.yml file defines scrape configurations, which tell Prometheus where to collect metrics from. The default file includes a job named prometheus that scrapes its own metrics. You need to add a new job for your Ethereum execution client (e.g., Geth). Below is an example configuration snippet to add, assuming Geth's metrics are exposed on port 6060.

yaml
scrape_configs:
  - job_name: 'geth'
    static_configs:
      - targets: ['localhost:6060']

After editing the configuration, you must restart Prometheus for the changes to take effect using sudo systemctl restart prometheus. Always verify the service restarted successfully and check its logs for any errors with sudo journalctl -u prometheus -f --no-pager. To confirm Prometheus is scraping your node, navigate to its web interface, typically at http://your-server-ip:9090. Go to Status > Targets. The state for your geth job should show as UP.

For production setups, consider securing your Prometheus instance. Basic steps include: configuring a firewall to restrict access to port 9090, setting up reverse proxy with HTTPS via Nginx or Apache, and using the --web.external-url flag if accessed via a domain. Prometheus data is stored by default in /var/lib/prometheus/. Ensure this directory is on a volume with sufficient storage for your retention period, which is configured in prometheus.yml with the storage.tsdb.retention.time flag.

install-grafana
VISUALIZATION

Step 3: Install Grafana and Import Dashboards

Grafana transforms Prometheus metrics into actionable, real-time dashboards for monitoring your blockchain node's health and performance.

Grafana is an open-source analytics and visualization platform that connects to data sources like Prometheus. While Prometheus collects and stores metrics, Grafana provides the user interface to query, visualize, and alert on that data. It allows you to create custom dashboards with graphs, gauges, and tables, giving you a single pane of glass to monitor your node's CPU usage, memory consumption, disk I/O, and network activity. This visual layer is essential for quickly identifying performance bottlenecks or service degradation.

To install Grafana on Ubuntu/Debian, you can use the official APT repository for the latest stable version. First, add the Grafana GPG key and repository, then install the package. After installation, enable and start the Grafana service so it runs automatically on boot. The default configuration is suitable for most setups, listening on port 3000. You can verify the service is running with sudo systemctl status grafana-server.

Once Grafana is running, access the web interface at http://your-server-ip:3000. The default login credentials are admin for both username and password; you will be prompted to change the password on first login. The next critical step is to add Prometheus as a data source. Navigate to Configuration > Data Sources, click 'Add data source', and select Prometheus. Set the URL to http://localhost:9090 (assuming Prometheus runs on the same machine) and click 'Save & Test'. A green success message confirms the connection.

Instead of building dashboards from scratch, you can import community-built dashboards tailored for node monitoring. A highly recommended starting point is the Node Exporter Full dashboard (ID: 1860). To import it, go to Dashboards > New > Import, paste the dashboard ID, and load it. Select your Prometheus data source from the dropdown and click 'Import'. This dashboard provides immediate, comprehensive visualizations for system metrics collected by the node_exporter service you configured in Step 2.

The imported dashboard will display panels for key system indicators. Key panels to monitor include: CPU usage per core, Memory utilization (showing used, cached, and buffered memory), Disk I/O rates and latency, Network traffic (inbound/outbound), and System load average. You should set up alerts within Grafana for critical thresholds, such as disk space below 10% or memory usage consistently above 90%. This proactive monitoring helps prevent node downtime and data loss.

For blockchain-specific monitoring, you can also import dashboards designed for your node client (e.g., Geth, Erigon, Prysm, Lighthouse). Search the Grafana Labs dashboard library for your client name. After importing client-specific dashboards, you will gain insights into chain synchronization status, peer counts, propagation times, and validator performance (for consensus clients). Combining system and client dashboards gives you a complete operational view of your node's health and its function within the network.

ESSENTIAL HEALTH INDICATORS

Critical Node Metrics to Monitor

Key performance and health metrics to track for blockchain node stability and security.

MetricHealthy RangeWarning ThresholdCritical Alert

Block Sync Lag

< 5 blocks

5-20 blocks

20 blocks

Peer Count

50-100 peers

20-50 peers

< 20 peers

CPU Usage

< 60%

60-80%

80%

Memory Usage

< 70%

70-85%

85%

Disk I/O Wait

< 5%

5-20%

20%

Network In/Out

Stable baseline

2x baseline spike

Sustained 5x spike

Validator Uptime (if applicable)

99%

95-99%

< 95%

RPC Error Rate

< 0.1%

0.1-1%

1%

node-specific-metrics
MONITORING

Step 4: Configuring Node-Specific Metrics

This guide explains how to set up and interpret the core metrics for monitoring your blockchain node's health and performance.

After establishing a basic monitoring framework, the next step is to define and track the node-specific metrics that are critical for operational health. These metrics provide a real-time view into your node's core functions, such as block synchronization, peer connectivity, and resource utilization. Unlike generic system metrics, these are specific to the blockchain client software you are running, like Geth, Erigon, or Prysm. Key categories include chain_head_height, p2p_peers, and txpool_pending.

Most modern node clients expose these metrics via a Prometheus endpoint. For example, Geth uses the --metrics flag and serves data on port 6060. To enable it, you would start your node with a command like geth --metrics --metrics.addr 0.0.0.0 --metrics.port 6060. Similarly, Erigon uses --metrics and Prysm uses --monitoring-host. Once enabled, Prometheus can be configured to scrape this endpoint, making the metrics available for visualization in Grafana dashboards.

The most critical metrics to monitor fall into three areas. Synchronization status (eth_syncing) indicates if your node is catching up to the network. Peer count (p2p_peers) shows network connectivity; a sudden drop can indicate isolation. Transaction pool size (txpool_pending) reflects network activity and potential memory issues. For consensus clients (e.g., Prysm), you must also track attestation participation rate and validator balance. Setting alerts for thresholds—like peers falling below 10 or sync status being true for over an hour—is essential for proactive maintenance.

To create actionable dashboards, group related metrics logically. A Network View panel might combine peer count, inbound/outbound traffic, and peer latency. A Chain View panel should display current block, sync status, and propagation times. A Resources & Performance panel tracks the node's CPU, memory, and disk I/O in the context of blockchain operations. This structure allows you to quickly diagnose issues; for instance, high CPU with low peer count might point to a local processing bottleneck rather than a network problem.

Remember that normal baselines vary by network and client. An Ethereum archive node will have different disk I/O patterns than a light client. Document your node's typical performance during stable operation to establish meaningful alert thresholds. Regularly review and adjust these configurations, especially after client upgrades or network hard forks, as metric names or their significance can change. Consistent monitoring of these specific signals is what transforms a simple running process into a reliable, maintainable network participant.

monitoring-tools
BEYOND THE DASHBOARD

Alternative Monitoring Tools and Agents

While dashboards provide a high-level view, dedicated monitoring agents and tools are essential for deep observability, alerting, and automation. These solutions offer granular control and integration with existing DevOps workflows.

NODE MONITORING

Troubleshooting Common Issues

Common problems encountered when setting up node monitoring for Ethereum, Solana, or other blockchains, with practical solutions.

A node failing to sync is often due to network, disk, or configuration issues. First, check your node's logs for specific errors. Common causes include:

  • Insufficient disk space: Ensure you have at least 1.5x the current chain size (e.g., ~1.2TB for an Ethereum archive node).
  • Peer connectivity issues: Verify your firewall allows traffic on the P2P port (e.g., 30303 for Geth). Use net_peerCount to check connections.
  • Corrupted database: For Geth, a --datadir.ancient path mismatch can cause failures. For Erigon, a --snapshots flag may be required.
  • Memory constraints: Sync processes like geth sync require significant RAM; insufficient memory leads to crashes.

Action: Increase verbosity in logs, ensure stable internet, and consult your client's documentation for sync flags.

NODE MONITORING

Frequently Asked Questions

Common questions and solutions for developers setting up and troubleshooting basic node monitoring.

Focus on these five core metrics to assess node health and performance:

1. Sync Status: Monitor eth_syncing or equivalent RPC call. A false response indicates your node is fully synced. For archival nodes, track the block height against the network's latest block.

2. Peer Count: A stable peer count (e.g., 50-100 for Geth, 50+ for Erigon) is critical for receiving blocks and transactions. A low or dropping count can lead to sync issues.

3. Memory & CPU Usage: High memory usage can cause crashes. For example, a Geth node with the --cache flag set too high may exceed available RAM. Monitor for consistent high CPU usage, which can indicate processing bottlenecks.

4. Disk I/O and Space: Log disk read/write latency. Slow disk I/O will stall syncing. Ensure you have significant free space (e.g., 20%+ of total) for chain data growth and temporary files.

5. RPC Error Rate: Track the rate of failed RPC requests (e.g., 5xx errors). A spike often indicates the node is overloaded or has an internal issue preventing request processing.

How to Set Up Basic Node Monitoring for Blockchain | ChainScore Guides