cd /news/developer-tools/i-built-a-lightweight-docker-contain… · home topics developer-tools article
[ARTICLE · art-46166] src=github.com ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

I built a lightweight Docker container monitor that notifies you alerts

A developer released a lightweight Docker container health monitor that watches all containers via the Docker socket and sends alerts via Telegram, Email, or Webhook when containers exit, die, or become unhealthy. The tool supports recovery detection, cooldown to prevent spam, and optional label filtering, running as a minimal Docker container with YAML or environment variable configuration.

read2 min views1 publishedJul 1, 2026
I built a lightweight Docker container monitor that notifies you alerts
Image: source

Lightweight Docker container health monitor. Watches all containers on the host and sends notifications via Telegram, Email, and/or Webhook when a container goes down or recovers.

  • Monitors all containers via Docker socket (no agent needed)
  • Detects exited

,dead

, andunhealthy

states - Recovery detection: notifies when a container comes back up

  • Cooldown to avoid notification spam
  • Optional label filter to watch only specific containers
  • Config via YAML file or environment variables
  • Runs as a Docker container with minimal footprint
cp config.example.yml config.yml

docker compose up -d --build

Config file is loaded from /config/config.yml

inside the container (mount your local config.yml

).

All values can also be set via environment variables (see docker-compose.yml

).

Key Default Description
interval
30
Seconds between checks
cooldown
300
Seconds before re-notifying same container
label_filter
Only watch containers with this label
  • Open Telegram and search for @BotFather - Send /newbot

and follow the prompts to choose a name and username (must end inbot

) - BotFather will reply with your token— copy it into your config

Finding your chat ID:

  • Send any message to your bot

  • Open in browser: https://api.telegram.org/bot<TOKEN>/getUpdates

  • If the result is empty ( "result":[]

), it means the bot hasn't received any messages yet — go to Telegram, open the bot, pressStart or send a message, then reload the URL - Look for "chat":{"id": 123456789}

in the JSON — that number is yourchat_id

Standard SMTP. Works with any provider (Gmail, Mailgun, your own server, etc.).

Sends a POST request with a JSON payload:

...

...

npm install
npm run dev

Requires Docker socket access on the host.

MIT

If you find this project useful, consider buying me a coffee:

── more in #developer-tools 4 stories · sorted by recency
── more on @docker 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-a-lightweigh…] indexed:0 read:2min 2026-07-01 ·