A python script for monitoring NEAR Protocol validator performance, tracking blocks and chunks production. Runs by default non stop on a timed interval. If you want to get alerts on your validator underperforming, the easiest way to do it is to use with the --single-run & --quiet mode, while specifying your validator via --val-id. Then have urlwatch call the script and alert you only when the results displayed changed (which will alert when the epoch turns and you've missed any blocks/chunks or every time your miss count changes during an epoch).
- Python 3.6 or higher
- Access to a NEAR RPC endpoint (default:
localhost:3030)
python3 valmon.py [options]--val-id: Monitor a specific validator by account ID--quiet: Show only performance data (requires --val-id)--single-run: Run once and exit--interval: Set monitoring interval in seconds (default: 60)
Monitor all validators:
python3 valmon.pyMonitor specific validator:
python3 valmon.py --val-id example.nearQuick status check:
python3 valmon.py --val-id example.poolv1.near --quiet --single-runCustom interval:
python3 valmon.py --interval 300 # Check every 5 minutesShows detailed information about:
- Missing blocks per validator
- Missing chunks per validator
- Timestamp for each check
- Connection status
Displays concise status:
- Number of missed blocks
- Number of missed chunks
The script handles various error conditions:
- RPC connection failures
- Invalid validator IDs
- Network interruptions
Press Ctrl+C to stop the monitoring process.
CC 4.0