open.monitor is a powerful Discord bot designed specifically for SA-MP and open.mp server communities. It enhances your server management experience by providing real-time monitoring, automated status updates, and comprehensive analytics.
- Live Status Updates:
- Server online/offline status
- Current player count and server capacity
- Gamemode and language information
- Password protection status
- Automatic version detection (SA:MP vs open.mp)
- Player Activity Charts:
- 30-day player activity trends with professional styling
- Peak player tracking and statistics
- Server utilization percentage
- Weekly trend analysis with growth indicators
- Interactive tooltips with detailed information
- Dynamic Channel Management:
- Voice channels with live player counts
- Server IP display channels
- Automated status embed updates every 3 minutes
- Daily chart generation at midnight
- Flexible Server Management:
- Monitor multiple servers per Discord guild
- Easy server switching and activation
- Individual server configuration and data tracking
- Automatic first-server activation
- Advanced Access Control:
- Admin-only commands by default
- Configurable management roles
- Public read-only commands (charts, status)
- Flexible permission inheritance
- Performance Analytics:
- Uptime/downtime statistics
- Historical data retention (30 days)
- Peak player tracking
- Server reliability metrics
- Node.js 18 or higher
- MySQL 8.0 or higher
- Discord Bot Token and Application
-
Clone the repository
git clone https://github.com/itsneufox/open.monitor.git cd open.monitor -
Install dependencies
npm install
-
Configure environment
cp .env.example .env # Edit .env with your configuration -
Build and start
npm run build npm start
Configure the bot through your .env file:
| Variable | Description |
|---|---|
TOKEN |
Discord bot token |
CLIENT_ID |
Discord application client ID |
DATABASE_URL |
MySQL connection string |
- Create application at Discord Developer Portal
- Create bot and copy token to
.env - Invite bot using this URL:
https://discord.com/oauth2/authorize?client_id=1398997044219216073
The bot requires these Discord permissions:
- View Channels
- Send Messages
- Embed Links
- Attach Files
- Read Message History
- Use Slash Commands
- Manage Channels
- Manage Messages
/server add <ip> [port] [name]- Add server to monitoring (auto-activates if first)/server list- Display all configured servers with status indicators/server activate <server>- Set active monitoring target/server remove <server> <confirm>- Remove server and all associated data/server status [server]- Get detailed server status information
/monitor setup <status_channel> [chart_channel] [player_count_channel]- Quick monitoring setup wizard/monitor enable- Enable automatic monitoring with current settings/monitor disable- Disable all monitoring functions/monitor status- Show current monitoring configuration
/chart [server]- Generate 30-day player activity chart with statistics/forceupdate [server]- Force immediate status and channel updates/role set <role>- Configure management role (admin only)/role remove- Remove role requirements (admin only)/role show- Display current role configuration
# Add your first server (automatically becomes active)
/server add ip:127.0.0.1 port:7777 name:"My SA:MP Server"
# Configure monitoring channels
/monitor setup status_channel:#server-status chart_channel:#analytics
# Server is now being monitored automatically!# Add multiple servers
/server add ip:192.168.1.100 port:7777 name:"Main Server"
/server add ip:192.168.1.101 port:7778 name:"Test Server"
# Switch active monitoring
/server activate "Test Server"
# View all servers
/server list# Allow server moderators to manage the bot
/role set @Server Moderators
# View current permissions
/role show
# Remove role requirement (admin-only again)
/role removeversion: '3.8'
services:
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: your_password
MYSQL_DATABASE: openmonitor
volumes:
- mysql_data:/var/lib/mysql
bot:
build: .
depends_on:
- mysql
environment:
- DATABASE_URL=mysql://root:your_password@mysql:3306/openmonitor
restart: unless-stopped
volumes:
mysql_data:# Clone and setup
git clone https://github.com/itsneufox/open.monitor.git
cd open.monitor
cp .env.example .env
# Edit .env with your configuration
# Build and start
npm run build
docker-compose up -dContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- SA-MP Team for the original San Andreas Multiplayer mod
- open.mp Team for the modern server implementation
Created and maintained by itsneufox