DEV Community

dohelper
dohelper

Posted on

DockWatch: Lightweight Docker Monitoring with Anomaly Detection & Telegram Alerts

Are you flying blind with your Docker containers? One command changes that.

I built DockWatch — a lightweight, self-hosted Docker monitoring dashboard that gives you full visibility into your containers with zero configuration.

What is DockWatch?

DockWatch runs as a single Docker container and collects real-time CPU, memory, network, and disk metrics from all your containers and the host machine. Everything is displayed in a clean, dark-themed web UI that auto-refreshes every 10 seconds.

No agents to install. No external database. No complex setup. Just mount the Docker socket, run one command, and you're done.

Key Features

  • 📊 Real-time Dashboard — Dark-themed UI with sortable tables and Chart.js charts
  • 🔍 Container Monitoring — CPU %, memory %, network I/O, block I/O, restart count
  • 🌡️ Host Monitoring — CPU/GPU temperature, disk usage, load average
  • 🚨 Anomaly Detection — 6 built-in rules: CPU spike, memory overflow, high temp, disk full, unexpected restart, network surge
  • 📱 Telegram Alerts — Instant notifications with 30-minute cooldown per alert type
  • 🔒 Security — Basic Auth, rate limiting, HTTPS (self-signed or Cloudflare Tunnel)
  • Lightweight — Only 4 Python packages, SQLite with 7-day retention

Quick Start

git clone https://github.com/deep-on/dockwatch.git && cd dockwatch && bash install.sh
Enter fullscreen mode Exit fullscreen mode

That's it. The interactive installer sets up authentication, Telegram alerts, and HTTPS in under a minute.

Requirements: Docker (with Compose v2), Git, OpenSSL

Anomaly Detection

DockWatch watches your containers 24/7 and alerts you before users notice:

Rule Condition
Container CPU >80% for 3 consecutive checks
Container Memory >90% of limit
Host CPU Temp >85°C
Host Disk >90% usage
Container Restart restart_count increased
Network Spike RX 10x surge + >100MB

All thresholds are configurable via environment variables.

Access Modes

  • Local Network — Self-signed SSL, access via https://localhost:9090
  • Remote Access — Port forwarding option
  • Cloudflare Tunnel — Recommended for remote access, no port-forwarding needed, proper TLS certificate

Why I Built This

Existing Docker monitoring solutions are either too heavy (Prometheus + Grafana stack) or too simple (just showing container status). I wanted something in between — lightweight enough to run on a home server, but smart enough to catch problems automatically and ping me on Telegram.

DockWatch is the result: 4 Python dependencies, a single HTML file for the UI, and SQLite for storage. It stays out of your way until something goes wrong.

Try It Out

🔗 GitHub: https://github.com/deep-on/dockwatch

Feedback, issues, and PRs are welcome! If you find it useful, a ⭐ on GitHub goes a long way.


Built by DeepOn Inc.

Top comments (0)