A real-time server monitoring dashboard for Discord that provides live status updates using TCP heartbeats, port checks, and HTTP monitoring with animated visual indicators. Live: https://live-monitor.ankitgupta.com.np/
- TCP Heartbeat System: Direct bot-to-bot communication for instant status updates
- Port Checking: Monitor game servers, applications, and services
- HTTP/HTTPS Monitoring: Website and web service availability checks
- Live Updates: Automatic dashboard refreshes every 30 seconds
- Beating Hearts for online services:
πβπβπ - Breaking Hearts for offline services:
πβββπ€ - Visual Service Categories: Distinct icons for bots, servers, and web services
- Service Grouping: Organized by Bot Services, Server Services, and Web Services
- Uptime Tracking: Automatic calculation of service availability
- Response Time Monitoring: Real-time performance metrics
- Historical Data: Last seen timestamps and connection history
- Node.js 18 or higher
- Discord Bot Token
- Basic knowledge of Discord Developer Portal
- Clone the repository
git clone https://github.com/hyperdargo/Live-Monitor
cd Live-Monitor- Install dependencies
npm install discord.js axios-
Configure your bot
- Create a new application at Discord Developer Portal
- Get your bot token
- Enable required intents (Guilds, Guild Messages)
- Invite the bot to your server
-
Configure the monitoring script Edit the configuration section in
status-bot.js:
const BOT_TOKEN = 'YOUR_BOT_TOKEN_HERE';
const CHANNEL_ID = 'YOUR_CHANNEL_ID_HERE';- Customize your services
Modify the
SERVICESarray to monitor your specific services:
const SERVICES = [
{ name: 'Music Bot', type: 'heartbeat', port: 25579 },
{ name: 'Game Server', type: 'port', host: 'server.example.com', port: 25565 },
{ name: 'Website', type: 'http', url: 'https://example.com' }
];- Start the bot
node status-bot.js- Purpose: Monitor Discord bots and applications
- How it works: Bots connect to designated ports to send heartbeat signals
- Setup: Configure your bots to connect to the heartbeat port
- Response Time: Instant (TCP connection based)
- Purpose: Monitor game servers, databases, and applications
- How it works: Regular TCP connection attempts to specified ports
- Setup: Add hostname and port for each service
- Response Time: Typically 1-5 seconds
- Purpose: Monitor websites and web applications
- How it works: HTTP/HTTPS requests with status code validation
- Setup: Add URL for each web service
- Response Time: Varies based on server response
{
name: 'Service Name', // Display name in dashboard
type: 'heartbeat|port|http', // Monitoring type
port: 25579, // Port number (for heartbeat/port types)
host: 'example.com', // Hostname (for port type)
url: 'https://example.com' // URL (for http type)
}- Service Checks: Every 60 seconds
- Dashboard Updates: Every 30 seconds (for animation)
- Heartbeat Timeout: 3 minutes (offline detection)
Modify the getStatusIcon() function in status-bot.js:
// Online animation sequence
const heartBeats = ['π', 'π', 'π'];
// Offline animation sequence
const brokenHearts = ['π', 'β', 'π€'];Add new service types by modifying the getServiceIcon() function:
function getServiceIcon(service) {
switch(service.type) {
case 'heartbeat': return 'π€';
case 'port': return 'π₯οΈ';
case 'http': return 'π';
case 'database': return 'ποΈ'; // Add new type
default: return 'π';
}
}Edit the createStatusEmbed() function to:
- Change colors (use hex codes)
- Modify field layouts
- Add custom footer/header text
- Adjust timestamp formats
The system automatically calculates and displays:
- Total Uptime: Cumulative time service has been online
- Current Status: Real-time availability
- Last Seen: Time since last successful connection
- Format: Automatically adjusts (seconds β minutes β hours β days)
- Status Changes: Automatic dashboard updates on state changes
- Console Logging: Detailed logs for debugging
- Visual Indicators: Color-coded embeds and animated emojis
To add notifications (DM alerts, webhooks, etc.):
- Add notification logic to the
checkAllServices()function - Trigger notifications when
hasChangesis true - Implement your preferred notification method
-
Bot won't start
- Verify Node.js version (18+ required)
- Check Discord bot token validity
- Ensure required intents are enabled
-
Services show as offline
- Verify port numbers and hostnames
- Check firewall settings
- Ensure services are running and accessible
-
Heartbeat not working
- Confirm heartbeat port is open
- Check if bots are connecting to correct port
- Verify network connectivity
-
Dashboard not updating
- Check channel permissions
- Verify bot has message sending permissions
- Check for rate limiting
π Heartbeat received from ServiceName- Successful heartbeatπ Socket error- Connection issuesπ’ ServiceName: π ONLINE- Status change to onlineπ’ ServiceName: π OFFLINE- Status change to offline
- Never commit tokens to public repositories
- Use environment variables for sensitive data
- Consider using a
.envfile:
BOT_TOKEN=your_token_here
CHANNEL_ID=your_channel_id- Limit exposed ports to necessary services
- Use firewalls to restrict access
- Consider VPN for internal services
- Use minimal required permissions
- Regular token rotation
- Monitor bot access logs
createHeartbeatServer(port, serviceName)- Creates TCP server for heartbeat monitoringcheckHeartbeat(serviceName)- Verifies recent heartbeat activitycheckPort(host, port)- Tests TCP port connectivitycheckHTTP(url)- Performs HTTP status checksupdateStatusDashboard()- Updates Discord embed with current status
serviceStatus- Map of service name β boolean (online/offline)serviceUptime- Map of service name β uptime tracking objectlastHeartbeat- Map of service name β last heartbeat timestamp
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow existing code style
- Add comments for new functionality
- Update documentation accordingly
- Test changes thoroughly
This project is licensed under the MIT License - see the LICENSE file for details.
- Discord.js - Powerful Discord API library
- Node.js - JavaScript runtime
- Axios - Promise based HTTP client
For support, questions, or troubleshooting: Join our Discord community for assistance and updates:
π http://dsc.gg/dtempire-server
Our team and community members are ready to help you with:
- Setup and configuration
- Troubleshooting issues
- Feature requests
- Customizations
- General support
Made with π by DTEmpire Team
Last Updated: December 01, 2025