Admin Overview

As an administrator of the Somnia Validator Monitor Bot, you have access to powerful management tools and features. This guide covers everything you need to effectively manage the bot and its users.

Admin Capabilities

User Management

  • View all registered users and their subscriptions
  • Ban/unban users
  • Send direct messages to users
  • Monitor user activity

System Control

  • View system statistics and performance metrics
  • Control monitoring services
  • Broadcast messages to all users
  • Access detailed logs

Monitoring

  • Real-time bot health status
  • Database statistics
  • Performance metrics
  • Error tracking

Admin Commands

/admin

Opens the main admin panel with all available options.

🔐 Admin Panel

Select an option:
[📊 Bot Overview] 
[👥 Users]
[📈 RPC Performance] 
[💾 Manage DB]
[🔍 Find User] 
[❌ Close]

/help (for admins)

As an admin, the /help command directly opens the admin panel instead of showing the regular help message.

Note: All administrative functions are accessed through the interactive admin panel. There are no separate commands for individual admin actions.

Admin Panel Navigation

📊 Bot Overview

Shows comprehensive statistics:

  • Total users and active subscriptions
  • Validators being monitored
  • Bot uptime and version
  • Memory and CPU usage
  • Recent activity metrics

👥 Users

Displays user statistics:

  • Total user count
  • User growth trends
  • Most active users
  • Subscription distribution

📈 RPC Performance

Monitors blockchain connection:

  • RPC endpoint status
  • Response time metrics
  • Error rates
  • Request volume

💾 Manage DB

Database management options:

  • Export database tables in ~.csv format
  • Erase database tables

🔍 Find User

Search for specific users:

  • Enter Telegram user ID
  • View user details
  • Check subscriptions
  • Send direct message
  • Ban/unban functionality

Best Practices

Regular Monitoring

  1. Check Bot Overview daily for anomalies
  2. Monitor error logs for issues
  3. Track user growth trends
  4. Watch for performance degradation

User Management

  1. Investigate before banning users
  2. Document reasons for bans
  3. Respond to user issues promptly
  4. Use broadcast sparingly

System Maintenance

  1. Schedule maintenance during low activity
  2. Announce maintenance in advance
  3. Backup database before major changes
  4. Monitor after updates

Security Considerations

Protecting Admin Access

  • Admin IDs are configured in environment variables
  • Only trusted team members should be admins
  • Regularly review admin list
  • Use strong Telegram account security

Handling Sensitive Data

  • User data is isolated by design
  • Don't share user subscription details publicly
  • Be careful with broadcast messages
  • Respect user privacy

Emergency Procedures

Bot Unresponsive

  1. Check server/hosting status
  2. Review error logs
  3. Restart bot service
  4. Check database connectivity

Mass Errors

  1. Stop monitoring temporarily
  2. Identify error source
  3. Fix issue
  4. Resume monitoring
  5. Notify affected users

Database Issues

  1. Stop bot to prevent corruption
  2. Backup current database
  3. Run database repairs
  4. Restore from backup if needed
  5. Restart bot