Overview
ANXT Watcher is a comprehensive monitoring solution designed specifically for Cosmos-based blockchain validators. It continuously monitors validator node status, block signing performance, and various other metrics to ensure optimal performance and uptime.
Running a validator node requires constant monitoring to maintain high performance and avoid penalties like slashing. ANXT Watcher makes this task easier by providing real-time monitoring and alerting capabilities for validator operators.
The tool can detect issues such as missed blocks, signing problems, and other critical events that could affect validator performance and reputation. When issues are detected, ANXT Watcher can send alerts via multiple channels including Telegram and Discord.
Key Features
- Real-time Monitoring - Continuously monitor validator performance, block signing, and network status.
- Missed Block Detection - Instantly detect and alert when your validator misses blocks.
- Multi-validator Support - Monitor multiple validators across different Cosmos-based chains from a single instance.
- Multiple Alert Channels - Send alerts via Telegram, Discord, or custom webhook endpoints.
- Detailed Logging - Comprehensive logging of all monitored events for analysis and troubleshooting.
- Custom Alert Thresholds - Configure thresholds for different alert types based on your specific requirements.
- Low Resource Consumption - Optimized for minimal resource usage, suitable for running on the same server as your validator.
Installation
ANXT Watcher can be installed directly from GitHub:
git clone https://github.com/ChainTools-Tech/anxt_watcher
cd anxt_watcher
pip install -r requirements.txt
Requirements
- Python 3.8 or higher
- Access to RPC endpoints for your validator nodes
- Telegram Bot API token (optional, for Telegram alerts)
- Discord webhook URL (optional, for Discord alerts)
Usage
Configure ANXT Watcher and start monitoring your validators:
# Edit the configuration file
nano config.yaml
# Start monitoring
python3 anxt_watcher.py
# Run as a background service
python3 anxt_watcher.py &
# Or set up as a systemd service for automatic startup
Configuration
Create a YAML configuration file to specify your validators and alert settings:
validators:
- name: "MyValidator-Cosmos"
chain_id: "cosmoshub-4"
rpc_endpoint: "http://localhost:26657"
validator_address: "cosmosvaloper1abc..."
- name: "MyValidator-Osmosis"
chain_id: "osmosis-1"
rpc_endpoint: "https://rpc.osmosis.zone"
validator_address: "osmovaloper1xyz..."
alerts:
missed_blocks:
enabled: true
threshold: 1 # Alert after 1 missed block
signing_issues:
enabled: true
consensus_issues:
enabled: true
notifications:
telegram:
enabled: true
bot_token: "YOUR_BOT_TOKEN"
chat_id: "YOUR_CHAT_ID"
discord:
enabled: true
webhook_url: "YOUR_DISCORD_WEBHOOK_URL"
logging:
level: "info" # debug, info, warning, error
file: "anxt_watcher.log"
Alert System
ANXT Watcher provides a sophisticated alert system that can notify you of various issues with your validator nodes:
Alert Examples
Missed Block Alert
[2025-04-30 15:23:47] ALERT: MyValidator-Cosmos missed a block at height 8692451
Validator: cosmosvaloper1abc...
Missed blocks in last hour: 1
Missed blocks in last day: 3
Action: Check validator node status and network connectivity
Signing Issue Alert
[2025-04-30 16:12:33] ALERT: MyValidator-Osmosis signing issues detected
Validator: osmovaloper1xyz...
Last signed height: 8925663
Current chain height: 8925670
Potential issue: Validator may be experiencing signing key or sentry node problems
Action: Check validator key management system and node logs
Integration with Monitoring Systems
ANXT Watcher can be integrated with various monitoring and alerting systems:
Telegram Integration
To set up Telegram alerts, configure your bot token and chat ID in the configuration file:
notifications:
telegram:
enabled: true
bot_token: "YOUR_BOT_TOKEN" # Get from BotFather
chat_id: "YOUR_CHAT_ID" # Your personal or group chat ID
alert_format: "{timestamp}: ALERT - {validator_name} - {alert_type}\n{details}"
Discord Integration
For Discord alerts, configure a webhook URL in the configuration file:
notifications:
discord:
enabled: true
webhook_url: "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
username: "ANXT Watcher" # Bot username in Discord
avatar_url: "https://example.com/avatar.png" # Optional avatar image
embed_color: "#FF0000" # Color for alert embeds
Related Resources
- Cosmos Validator Security - Official Cosmos documentation on validator security best practices
- Tendermint Monitoring Guide - Guide to monitoring Tendermint-based chains
- Telegram Bot API - Documentation for setting up Telegram bots for notifications