Back to the curriculum
Part 4 · Lesson 10
Production-Grade

Monitoring, Logs & Alerts

Knowing your server is down before your users tell you.

intermediate11 min readUpdated 2026-04-11

The three things you need to watch

Uptime of your public endpoints (is the site responding?). Resource usage on the host (CPU, memory, disk). Application errors (is the app crash-looping or spraying 500s?). Three signals, three tools. You do not need Datadog to run a side project — you need a check on each of the three, and an alert that reaches your phone.

Uptime Kuma: the self-hosted Pingdom

Uptime Kuma is a free, open-source uptime monitor you run in Docker. It polls your endpoints on whatever interval you choose and pings Discord, Slack, Telegram, email, or ntfy when something goes down. One docker run and you have a status page plus alerts. Run it on a different VPS from the one it is monitoring — self-hosting your alerting on the box that dies is a classic trap.

Host metrics without Prometheus

For a one-box setup, netdata gives you real-time CPU, memory, disk, network, and per-container metrics on a web UI with zero config. docker run -d --name=netdata -p 19999:19999 netdata/netdata. When you need alerts on thresholds (RAM over 90%, disk over 80%), netdata has them built in and pipes to the same notification backends as Uptime Kuma. Only reach for Prometheus + Grafana when you outgrow netdata, which for most self-hosters is never.

Docker logs: forget-about-it aggregation

docker compose logs -f --tail 100 app is enough for 90% of debugging. For the other 10%, pipe logs to Loki + Grafana (self-hosted, free) or Better Stack (managed, free tier). Loki understands Docker labels natively — tag your containers with service=api and you get a searchable log explorer for free. Do not skip log rotation: add logging: driver: json-file, options: max-size: 10m, max-file: 3 to every service in compose.yml or your disk fills up at 3 AM.

Alerts that actually wake you up

A Discord webhook in a channel you keep open is the cheapest pager on earth — free, push notifications on your phone, and you can mute it when you are off. For paid, ntfy ($5/mo) and Healthchecks.io (free tier) both work with zero config. Whatever you pick: test the alert path by deliberately breaking a service. An alert you never test is a theoretical alert.

Key takeaways

  • Watch uptime, host metrics, and app errors — three separate signals
  • Run Uptime Kuma on a *different* VPS than the one it watches
  • netdata replaces Prometheus + Grafana for single-box setups
  • Log rotation in Compose prevents full-disk outages at 3 AM

Related documentation

Related templates