A lightweight command-line health checker for EVM-compatible JSON-RPC endpoints.
It measures RPC latency, chain ID, latest block height, and latest-block age so operators can quickly spot slow, stale, or unavailable endpoints.
- Checks one or many EVM JSON-RPC URLs
- Measures request latency
- Reads
eth_chainIdandeth_blockNumber - Checks latest block timestamp and reports block age
- Fails with a non-zero exit code when an endpoint is unavailable or stale
- Human-readable and JSON output
- Standard-library only: no third-party Python packages
- Python 3.10+
git clone https://github.com/SamAlpha1/RPCHealthMonitor.git
cd RPCHealthMonitor
python rpc_health.py https://ethereum-rpc.publicnode.comCheck several endpoints:
python rpc_health.py \
https://ethereum-rpc.publicnode.com \
https://eth.llamarpc.comUse environment configuration:
cp .env.example .env
export RPC_URLS="https://ethereum-rpc.publicnode.com,https://eth.llamarpc.com"
python rpc_health.pyJSON output:
python rpc_health.py https://ethereum-rpc.publicnode.com --jsonChange the stale-block threshold:
python rpc_health.py https://ethereum-rpc.publicnode.com --stale-seconds 3000: every endpoint passed2: at least one endpoint failed or returned a stale latest block
This utility only performs read-only JSON-RPC calls. It never needs a wallet, seed phrase, or private key.
Before running unfamiliar GitHub or Web3 code, scan the account and its public repositories with GitHub Trust Auditor.
Maintained by SamAlpha1 · Follow @samalpha_ on X