Professional monitoring solution for Cosmos Validators
We deliberately chose to use pure Bash scripts instead of complex frameworks for this monitoring solution. This approach ensures simplicity, reliability, and minimal system overhead. No additional dependencies to manage, no complex configurations to learn - just efficient, lightweight scripts that get the job done. Perfect for validators who want a robust monitoring system without unnecessary complexity or server load.
๐ Features โข ๐ Requirements โข ๐ ๏ธ Installation โข ๐ค Contributing
|
|
%%{init: {
'theme': 'base',
'themeVariables': {
'primaryColor': 'rgba(33, 38, 45, 0.8)',
'primaryTextColor': '#C9D1D9',
'primaryBorderColor': 'rgba(48, 54, 61, 0.8)',
'lineColor': '#2ebd11',
'secondaryColor': 'rgba(33, 38, 45, 0.8)',
'tertiaryColor': 'rgba(33, 38, 45, 0.8)',
'noteTextColor': '#C9D1D9',
'noteBkgColor': 'rgba(33, 38, 45, 0.8)',
'noteBorderColor': 'rgba(48, 54, 61, 0.8)',
'labelTextColor': '#C9D1D9',
'labelBoxBkgColor': 'rgba(33, 38, 45, 0.8)',
'labelBoxBorderColor': 'rgba(48, 54, 61, 0.8)',
'stateBkg': 'rgba(33, 38, 45, 0.8)',
'stateLabelColor': '#C9D1D9',
'compositeBackground': 'transparent',
'altBackground': 'rgba(33, 38, 45, 0.8)'
}
}}%%
stateDiagram-v2
[*] --> CronScheduler: ๐ Start Monitoring
state CronScheduler {
state "๐ check.sh" as BlocksMonitor
state "๐ฎ ram_check.sh" as RAMMonitor
state "๐พ disk_check.sh" as DiskMonitor
note right of BlocksMonitor
Every 5 minutes
Checks last 10 blocks
end note
note right of RAMMonitor
Every 5 minutes
Threshold: 15GB
end note
note right of DiskMonitor
Every 6 hours
Threshold: <100GB free
end note
}
state "System Checks" as Checks {
state "๐ Check Last 10 Blocks" as Blocks
state "โก Check RAM Usage" as RAM
state "๐ Check Free Space" as Disk
}
BlocksMonitor --> Blocks: Monitor
RAMMonitor --> RAM: Track
DiskMonitor --> Disk: Analyze
state "Alert Process" as Alerts {
state "๐ Prepare Message" as PrepareMsg
state "๐ฑ Send Telegram" as SendTG
state "๐ Write Logs" as Log
}
Blocks --> PrepareMsg: โ Missed in last 10
RAM --> PrepareMsg: โ ๏ธ Usage โฅ 15GB
Disk --> PrepareMsg: ๐พ Free < 100GB
PrepareMsg --> SendTG: ๐ค Notify
SendTG --> Log: ๐ฅ Record
state "๐ System Reboot" as Reboot
RAM --> Reboot: After alert sent
note right of Alerts
All alerts are sent to
Telegram and logged in
system logs
end note
Feature | Description | Check Interval |
---|---|---|
๐ Missed Blocks Detection | Real-time validator performance tracking | Every 5 minutes |
๐ฎ RAM Management | Proactive memory management | Every 5 minutes |
๐พ Disk Space Monitoring | Regular storage monitoring | Every 6 hours |
๐ Telegram Alerts | Instant notifications | On events |
๐ Performance Logs | Comprehensive system logs | Continuous |
โก Auto-Recovery | Smart reboot system | On RAM alert |
Requirement | Minimum | Recommended |
---|---|---|
๐ง Linux | Ubuntu 20.04 | Ubuntu 22.04 |
๐ curl | 7.68.0 | Latest |
๐ง jq | 1.6 | Latest |
๐ฑ Telegram Bot | Any | Latest |
๐ป Bash | 5.0 | Latest |
# Get the tools
git clone https://github.com/Quasar-hub/quasar-server-sentinel.git
# Go to directory
cd quasar-server-sentinel
# Make executable
chmod +x *.sh
# Update script variables
nano check.sh
nano ram_check.sh
nano disk_check.sh
# Set up crontab
crontab -e
# Add these lines:
*/5 * * * * $HOME/quasar-server-sentinel/check.sh
*/5 * * * * $HOME/quasar-server-sentinel/ram_check.sh
0 */6 * * * $HOME/quasar-server-sentinel/disk_check.sh
# Verify crontab
crontab -l
Check your monitoring logs using these commands:
# Check RAM monitoring logs
cat /var/log/syslog | grep "RAM Monitor"
# Check Disk monitoring logs
cat /var/log/syslog | grep "Disk Monitor"
๐ Missed Blocks Settings (click to expand)
# check.sh configuration
RPC_ENDPOINT="http://localhost:26657"
VALIDATOR_ADDRESS="your_address"
CHAIN_ID="your_chain_id" # Chain identifier
THRESHOLD=10 # Alert after 10 consecutive missed blocks
๐พ Disk Space Settings (click to expand)
# disk_check.sh configuration
FREE_SPACE=100 # Alert when free space is below 100GB
๐ฎ RAM Settings (click to expand)
# ram_check.sh configuration
USED_RAM=15 # Alert and reboot when RAM usage exceeds 15GB
|
|
๐ Monitoring Schedule
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
โ Service โ Frequency โ Next Check โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโค
โ Blocks Check โ 5 minutes โ Auto โ
โ RAM Check โ 5 minutes โ Auto โ
โ Disk Check โ 6 hours โ Auto โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโ
- Security Settings - Basic firewall and SSH configuration
We welcome contributions! Check our Contributing Guide for details.
๐ Report Bug | ๐ Pull Request | ๐ก Suggest Feature |
---|
System Impact:
CPU: < 1% average usage
RAM: ~ 50MB memory usage
Disk: ~ 10MB for logs
Network: ~ 1MB/hour
If you find this useful:
- ๐ Star this repository
- ๐ Fork and contribute
- ๐ข Share with others