Comparing Uptime and Health Check Monitoring Solutions
A call from the boss at 2 AM: ‘How long has the site been down?’. This is a classic scenario that almost every DevOps engineer or SysAdmin has experienced. To continuously verify endpoint availability (endpoint health checks), we typically consider three main approaches:
- SaaS Services (Better Stack, UptimeRobot, Pingdom): Ready to use out of the box. The provider manages the multi-region probe infrastructure as well as SMS and phone call alerts.
- Prometheus + Blackbox Exporter: The gold standard for Cloud Native infrastructure. The exporter handles TCP/HTTP probing, Prometheus scrapes metrics, and Alertmanager handles alert routing.
- Dedicated Self-Hosted Tool (Uptime Kuma): A standalone bot designed specifically to ping URLs, inspect SSL expiration dates, host status pages, and send immediate alerts.
A Practical Comparison of the Solutions
Each option solves the problem at a different scale:
1. SaaS Solutions
- Pros: Takes less than 3 minutes to deploy. Probe servers are distributed globally for objective results. Zero infrastructure maintenance overhead.
- Cons: Free tiers have strict limitations. Check intervals are typically capped at 5 minutes. If you need 30-second checks across 50 websites, costs can quickly exceed $30–$50 per month. Additionally, external SaaS providers cannot probe servers behind an internal VPN.
2. Prometheus Blackbox Exporter
- Pros: Seamless integration if you already run a Prometheus stack. Manage all endpoints as code (IaC) via Git.
- Cons: Overkill for simple requirements. Requires writing YAML configs, setting up Grafana dashboards, and configuring Alertmanager rules from scratch.
3. Uptime Kuma (Self-Hosted)
- Pros: Fully open source. Intuitive web UI. Extremely lightweight footprint (only ~150MB–200MB of RAM). Built-in support for HTTP(s), TCP, DNS, container pings, and SSL certificate monitoring. Integrates with Telegram in just a few steps.
- Cons: Its critical vulnerability is being a single point of failure. If the VPS hosting Uptime Kuma loses connectivity or goes down, your entire alerting system goes with it. The workaround is implementing push monitors or cross-checking heartbeats.
Why You Should Isolate Uptime Kuma from Your Primary Server Cluster
In production, I run a Prometheus cluster monitoring over 15 server nodes. CPU, RAM, and Disk I/O metrics report back consistently and show great stability. Yet, visitors can still encounter a 502 Bad Gateway error.
The root causes vary wildly: a syntax error during an Nginx reload, a failed Let’s Encrypt certificate renewal in the middle of the night, or a misconfigured DNS record. In these cases, server hardware metrics still show 70% free RAM and under 10% CPU usage, so Prometheus considers the server perfectly healthy.
That is why we need Synthetic Monitoring. I host Uptime Kuma on a budget VPS (1 vCPU, 1GB RAM) located in a different data center. It acts just like an external visitor from the internet continuously reaching out to your website. If an SSL certificate has fewer than 7 days remaining or HTTP returns a 5xx status code on two consecutive checks, the on-call team’s Telegram buzzes immediately.
Deploying Uptime Kuma with Docker Compose
Packaging it with Docker Compose makes upgrading and migrating data straightforward whenever needed. The only prerequisite is a Linux server with Docker Engine installed.
Step 1: Prepare the Directory and docker-compose.yml
Create a dedicated directory to store the SQLite database:
mkdir -p /opt/uptime-kuma && cd /opt/uptime-kuma
nano docker-compose.yml
Paste the configuration below:
version: '3.8'
services:
uptime-kuma:
image: louislam/uptime-kuma:1
container_name: uptime-kuma
restart: unless-stopped
ports:
- "3001:3001"
volumes:
- ./data:/app/data
environment:
- TZ=Asia/Ho_Chi_Minh
security_opt:
- no-new-privileges:true
Step 2: Start the Service
Run the container in the background:
docker compose up -d
docker compose logs -f uptime-kuma
Once you see Listening on 3001 in the terminal output, the service is up. Open your browser and navigate to http://<Server-IP>:3001 to access the initial admin account setup page.
Step 3: Create a Telegram Bot and Retrieve the Token and Chat ID
Setting up an alert bot takes four quick steps:
- Open Telegram, message @BotFather, and send the command
/newbot. - Follow the prompts to name your bot. BotFather will return an HTTP API Token (for example:
7123456789:AAFk_...). Save this token. - Create an internal Telegram group (e.g., Ops-Alerts), then add the newly created bot to the group.
- Find the group’s Chat ID by sending a test message (e.g.,
hello bot) into the group. Next, open your browser and navigate to:https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdatesLocate the key
"chat":{"id": -100xxxxxxxxxx}in the JSON response. The negative number starting with-100is your group’s Chat ID.
Step 4: Configure the Notification Channel in Uptime Kuma
- From the Uptime Kuma dashboard, go to Settings (gear icon) > Notifications.
- Click Setup Notification and fill in the details:
- Notification Type: Select
Telegram. - Friendly Name: Enter an identifiable name, such as
Telegram Alert Group. - Bot Token: Paste the token received from BotFather.
- Chat ID: Enter the Chat ID formatted as
-100xxxxxxxxxx. - Toggle on Default enabled to automatically enable alerts for any newly added monitors.
- Notification Type: Select
- Click Test. If the bot successfully delivers a test message to the group, click Save to finish.
Step 5: Add an HTTP and SSL Expiry Monitor
On the main dashboard, click Add New Monitor:
- Monitor Type: Select
HTTP(s). - Friendly Name: Name the service, for example
Web Core Production. - URL: Enter the endpoint to probe, for example
https://yourdomain.com. - Heartbeat Interval: Set to
60seconds (or 30 seconds if high-frequency monitoring is required). - Retries: Select
2retries. This helps filter out false alarms caused by transient network hiccups. - Certificate Expiry Notification: Check this option. Specify threshold days:
14, 7, 3days. When the TLS certificate validity drops below these thresholds, the bot will automatically remind you to renew it.
Click Save. The monitor will turn green indicating an UP status, complete with a real-time response time latency chart.
Maintenance Best Practices and Safe Backups
All monitor configurations, accounts, and history are stored in ./data/kuma.db. Because SQLite is an embedded file-based database, performing raw file copies while the container is actively writing can lead to database locks or corrupted data.
The safest way to automate nightly cron backups is by utilizing the SQLite online backup API or briefly stopping the container:
# Method 1: Use sqlite3 online backup (no container downtime required)
docker exec uptime-kuma sqlite3 /app/data/kuma.db ".backup '/app/data/backup-$(date +%F).db'"
# Method 2: Periodically archive the entire data directory
tar -czvf /opt/backup-uptime-kuma-$(date +%F).tar.gz /opt/uptime-kuma/data
When a new release is published by Louis Lam, simply pull the latest image and restart the container:
docker compose pull
docker compose up -d --remove-orphans

