If your monitoring today is “someone tells me when it is down”, install this. Uptime Kuma is a small web application, MIT licence, that checks your services and tells you when one stops answering.
Official site: Log in or register to see this link
Source: Log in or register to see this link
What it checks
HTTP and HTTPS (with status code and keyword), TCP ports, ping, DNS records, Docker containers, databases, and “push” monitors where your own script reports in. For HTTPS it also warns before the certificate expires, which alone has saved a lot of people an embarrassing morning.
Notifications
Telegram, Discord, email, Slack, webhooks and a very long list of others. Set up one, press the test button, done.
Install
services:
uptime-kuma:
image: louislam/uptime-kuma:1
restart: unless-stopped
ports:
- "127.0.0.1:3001:3001"
volumes:
- ./data:/app/data
Check the README for the current version tag before you copy that line, there is a newer major version. The first visit asks you to create the admin account, so do that immediately and do not leave a fresh install reachable from outside.
Put it behind a reverse proxy with HTTPS. It uses WebSockets, so the proxy needs the upgrade headers:
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
How to set it up so it is useful
Run it on a different server from the things it watches. A monitor that dies together with the service tells you nothing.
Set retries to 2 or 3 before a monitor counts as down. One lost packet at night should not wake you.
Use the push monitor for cron jobs. Your backup script calls a URL when it finishes. If the call does not arrive in time, you get an alert. That catches the worst kind of failure, the job that silently stopped running.
The status page is public if you want it to be. Handy for customers, and it stops the “is it down?” messages.
Limits
It is one process with an SQLite database. A few hundred monitors are fine. For thousands, or for metrics and graphs of CPU and bandwidth, you want Prometheus or Netdata next to it. Different job.