Skip to content

A professional, lightweight monitoring solution for Cosmos Validators using pure Bash scripts for simplicity and minimal system overhead. Monitor missed blocks, RAM usage, disk space with Telegram notifications. No complex frameworks, no heavy dependencies - just efficient, reliable monitoring tools.

License

Notifications You must be signed in to change notification settings

Quasar-hub/quasar-server-sentinel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ Cosmos Validator Monitoring Tools

Cosmos Validator Monitoring

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.

Cosmos Telegram Bash License

๐Ÿš€ Features โ€ข ๐Ÿ“‹ Requirements โ€ข ๐Ÿ› ๏ธ Installation โ€ข ๐Ÿค Contributing


๐ŸŽฏ Why Choose This Tool?

๐Ÿ” Real-time Monitoring

  • โšก Instant block validation checks
  • ๐Ÿ’ฝ Regular disk space monitoring
  • ๐ŸŽฎ Active RAM usage tracking
  • ๐Ÿค– Automated alert system

๐Ÿ›ก๏ธ Proactive Management

  • ๐Ÿ”„ Automatic server reboot on high RAM
  • โš™๏ธ Customizable alert thresholds
  • ๐Ÿ“ฑ Telegram notifications
  • ๐Ÿ“Š Detailed logging system

๐Ÿ”„ How It Works

%%{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
Loading

โœจ Features

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

๐Ÿ“‹ Requirements

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

โšก Quick Start

# 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

๐Ÿ“ Monitoring Logs

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"

โš™๏ธ Configuration

๐Ÿ“œ 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

๐Ÿ”” Alert Examples

๐Ÿšซ Missed Blocks

โš ๏ธ Alert: Validator Issues
โ€ข Missed: 10 consecutive blocks
โ€ข Chain: your_chain_id
โ€ข Action: Check validator

๐Ÿ’พ Storage Alert

โš ๏ธ Alert: Low Storage
โ€ข Free: 95GB
โ€ข Status: Warning
โ€ข Action: Cleanup needed

๐Ÿ“Š System Status

๐Ÿ“Š Monitoring Schedule
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Service      โ”‚ Frequency   โ”‚ Next Check   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Blocks Check โ”‚ 5 minutes   โ”‚ Auto         โ”‚
โ”‚ RAM Check    โ”‚ 5 minutes   โ”‚ Auto         โ”‚
โ”‚ Disk Check   โ”‚ 6 hours     โ”‚ Auto         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ก Additional Resources

๐Ÿค Contributing

We welcome contributions! Check our Contributing Guide for details.

๐Ÿ› Report Bug ๐Ÿ”€ Pull Request ๐Ÿ’ก Suggest Feature

๐Ÿ“ˆ Resource Usage

System Impact:
CPU: < 1% average usage
RAM: ~ 50MB memory usage
Disk: ~ 10MB for logs
Network: ~ 1MB/hour

โญ Support

If you find this useful:

  • ๐ŸŒŸ Star this repository
  • ๐Ÿ”„ Fork and contribute
  • ๐Ÿ“ข Share with others

๐Ÿ“œ License

MIT License โ€ข Free and Open Source


Made with โค๏ธ by Quasar ๐Ÿค–๐Ÿงฌ๐Ÿง  validator

๐Ÿ” Back to Top

About

A professional, lightweight monitoring solution for Cosmos Validators using pure Bash scripts for simplicity and minimal system overhead. Monitor missed blocks, RAM usage, disk space with Telegram notifications. No complex frameworks, no heavy dependencies - just efficient, reliable monitoring tools.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages