I built a lightweight Docker container monitor that notifies you when

pizzuka1 pts0 comments

GitHub - PizzukaTorph/compose-watchdog: 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. · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

PizzukaTorph

compose-watchdog

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>2 Commits<br>2 Commits

src

src

.gitignore

.gitignore

Dockerfile

Dockerfile

LICENSE

LICENSE

README.md

README.md

config.example.yml

config.example.yml

docker-compose.yml

docker-compose.yml

package-lock.json

package-lock.json

package.json

package.json

tsconfig.json

tsconfig.json

View all files

Repository files navigation

compose-watchdog

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.

Features

Monitors all containers via Docker socket (no agent needed)

Detects exited, dead, and unhealthy 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

Quick start

cp config.example.yml config.yml<br># Edit config.yml with your notifier credentials

docker compose up -d --build

Configuration

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<br>Default<br>Description

interval<br>30<br>Seconds between checks

cooldown<br>300<br>Seconds before re-notifying same container

label_filter<br>Only watch containers with this label

Notifiers

Telegram

Open Telegram and search for @BotFather

Send /newbot and follow the prompts to choose a name and username (must end in bot)

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/getUpdates

If the result is empty ("result":[]), it means the bot hasn't received any messages yet — go to Telegram, open the bot, press Start or send a message, then reload the URL

Look for "chat":{"id": 123456789} in the JSON — that number is your chat_id

Email

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

Webhook

Sends a POST request with a JSON payload:

...

Label filter

...

Development

npm install<br>npm run dev

Requires Docker socket access on the host.

License

MIT

Support

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

About

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.

Topics

docker

infrastructure

open-source

devops

monitoring

docker-compose

containers

foss

vps

self-hosted

homelab

Resources

Readme

License

MIT license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

star

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

TypeScript<br>97.7%

Dockerfile<br>2.3%

You can’t perform that action at this time.

docker container config compose json containers

Related Articles