Discord Bot Uptime Monitoring: Keeping Your Bot Always Online in 2026
Your bot going offline at 2 AM and nobody knowing until noon is the worst case for community trust. Monitoring catches outages while they are still fresh and minimises downtime before it becomes a user experience problem.
What to Monitor
Process health — Is the bot process running at all?
Discord connectivity — Is the WebSocket connected to Discord's gateway?
Response latency — Is the bot responding to commands within acceptable time?
Memory usage — Is memory growth indicating a leak approaching OOM?
PM2 Built-in Health Checks
PM2 provides basic monitoring via pm2 status and metrics via pm2 monit. For minimal setup, PM2's auto-restart already provides MTTR (Mean Time to Recovery) of < 5 seconds on crashes.
PM2 + Discord webhook notification (setup covered in PM2 guide) sends crash alerts directly to your moderation Discord.
Uptime Kuma: Free Self-Hosted Monitoring
Uptime Kuma is a self-hosted monitoring tool that runs on the same VPS as your bot:
# Install with Docker
docker run -d --restart=always -p 3001:3001 \
-v uptime-kuma:/app/data \
--name uptime-kuma \
louislam/uptime-kuma:1
Access the dashboard at http://YOUR_VPS_IP:3001.
Add a monitor:
- Monitor type: HTTP(S) — if your bot has a health endpoint
- URL:
http://localhost:3000/health - Interval: Every 60 seconds
Adding a Health Endpoint to Your Bot
const express = require('express');
const app = express();
app.get('/health', (req, res) => {
if (!client.isReady()) {
return res.status(503).json({ status: 'disconnected' });
}
res.json({
status: 'ok',
ping: client.ws.ping,
guilds: client.guilds.cache.size,
uptime: process.uptime()
});
});
app.listen(3000, '127.0.0.1'); // Localhost only - don't expose publicly
Uptime Kuma hits this endpoint every minute. If it returns 503 or times out, Uptime Kuma sends you a notification immediately.
Notification Channels
Configure Uptime Kuma to notify via:
- Discord webhook — Alert lands directly in your admin channel
- Telegram — Immediate phone notification
- Email — For team notification
Response times vs. notification channel:
- Critical outage: Telegram/Discord (seen within minutes)
- Non-critical degradation: Email (reviewed daily)