DockWatch: Lightweight Docker Monitoring with Anomaly Detection & Telegram Alerts
Source: Dev.to
Introduction
Are you flying blind with your Docker containers? One command changes that.
DockWatch is a lightweight, self‑hosted Docker monitoring dashboard that gives you full visibility into your containers with zero configuration.
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 – Six built‑in rules: CPU spike, memory overflow, high temperature, disk full, unexpected restart, network surge.
- Telegram Alerts – Instant notifications with a 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.
Installation
git clone https://github.com/deep-on/dockwatch.git
cd dockwatch
bash install.sh
The interactive installer configures authentication, Telegram alerts, and HTTPS in under a minute.
Requirements
- Docker (with Compose v2)
- Git
- OpenSSL
Anomaly Detection Rules
| 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 10× surge and > 100 MB |
All thresholds are configurable via environment variables.
Access Options
- 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 and provides a proper TLS certificate
Why DockWatch?
Existing Docker monitoring solutions are either too heavy (e.g., Prometheus + Grafana) or too simple (just showing container status). DockWatch aims for a middle ground: lightweight enough for a home server, yet smart enough to detect problems automatically and notify you via Telegram.
Repository
🔗 GitHub:
Feedback, issues, and pull requests are welcome. If you find it useful, a ⭐ on GitHub is appreciated.
Built by DeepOn Inc.