No description
  • Python 99%
  • Dockerfile 1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Vela 2e70bdc9fa
All checks were successful
CI / test (push) Successful in 9s
Move deployment-specific endpoint/watch lists to .env
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 16:03:16 -03:00
.forgejo/workflows Fix Forgejo CI: install Python in runner's node image 2026-08-16 20:52:21 -04:00
.github/workflows Add CI, container publish workflow, and unit tests 2026-08-16 17:05:48 -04:00
tests Add NTFY_MAX_PRIORITY to cap alert priority 2026-10-20 14:35:41 -03:00
.gitignore Initial release — Docker health watchdog with ntfy alerts 2026-08-16 16:31:14 -04:00
docker-compose.yml Move deployment-specific endpoint/watch lists to .env 2026-10-20 16:03:16 -03:00
Dockerfile Add Docker healthcheck for container health monitoring 2026-08-16 22:35:48 -04:00
LICENSE Initial release — Docker health watchdog with ntfy alerts 2026-08-16 16:31:14 -04:00
lookout.py Add NTFY_MAX_PRIORITY to cap alert priority 2026-10-20 14:35:41 -03:00
README.md Add NTFY_MAX_PRIORITY to cap alert priority 2026-10-20 14:35:41 -03:00

Lookout

CI Release Container

A lightweight Docker container health watchdog that sends ntfy notifications when containers start, stop, or change health status.

Zero dependencies. Single Python file. Talks to the Docker socket directly using only the standard library.

Quick Start

# Run directly
NTFY_URL=http://localhost:8080 NTFY_TOPIC=docker python3 lookout.py

# Or with Docker
docker run -d \
  --name lookout \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -e NTFY_URL=http://ntfy:8080 \
  -e NTFY_TOPIC=docker \
  ghcr.io/agent-cyanez/lookout

What It Does

Lookout polls the Docker daemon and detects:

  • Container stopped — a running container disappears (high priority alert)
  • Container started — a new container appears
  • Health changed — a container transitions between healthy/unhealthy (unhealthy = high priority)

Notifications go to any ntfy server — self-hosted or ntfy.sh.

Configuration

Variable Default Description
DOCKER_HOST /var/run/docker.sock Path to Docker socket
NTFY_URL http://127.0.0.1:8888 ntfy server URL
NTFY_TOPIC lookout ntfy topic to publish to
NTFY_MAX_PRIORITY (none) Ceiling for alert priority (min, low, default, high, urgent). Set to default to keep high/urgent free for messages a human must see
POLL_INTERVAL 30 Seconds between checks
WATCH_FILTER (empty = all) Comma-separated container names to watch
WATCH_STOPPED false Include stopped containers in monitoring
NOTIFY_ON_START false Send a summary notification on startup

Docker Compose

services:
  lookout:
    image: ghcr.io/agent-cyanez/lookout
    container_name: lookout
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - NTFY_URL=http://ntfy:8080
      - NTFY_TOPIC=docker

Resource Usage

  • Memory: ~8 MB
  • CPU: Negligible (one HTTP request per poll)
  • Image size: ~25 MB (python:alpine)
  • Dependencies: None (stdlib only)

License

MIT