Logman is a lightweight, standalone observer for your Docker stack.
925
Logman is a lightweight, standalone observer for your Docker stack. It sits alongside your containers, watches their logs in real-time, and provides smart error alerting and a simple web dashboard.
Built in Rust for blazing speed and minimal footprint.
Add logman to your docker-compose.yml. It requires access to a Redis instance (for state tracking) and the Docker Socket (to read logs).
services:
# Your Application
api:
image: my-api:latest
# Logman Observer
logman:
image: gcsboss/logman:latest
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Read-only access is enough
environment:
- REDIS_URL=redis://redis:6379/
- SMTP_HOST=smtp.mailgun.org
- SMTP_PORT=587
- [email protected]
- SMTP_PASS=secret-password
- [email protected]
- [email protected]
ports:
- "3000:3000" # Web Dashboard
depends_on:
- redis
redis:
image: redis:7-alpine
Once running, open your browser to http://localhost:3000.
You will see a live list of aggregated errors, their counts, and their most recent occurrences.
Logman is configured entirely via Environment Variables.
| Variable | Description | Default |
|---|---|---|
REDIS_URL | Connection string for state storage. | redis://127.0.0.1:6379/ |
SMTP_HOST | SMTP Server for sending alerts. | localhost |
SMTP_PORT | SMTP Port. | 1025 |
SMTP_USER | (Optional) SMTP Username. | None |
SMTP_PASS | (Optional) SMTP Password. | None |
ALERT_TO | Email address to receive alerts. | [email protected] |
ALERT_FROM | Sender address for alerts. | [email protected] |
PUBLISH_MIN_LEVEL | Min log level to publish to Redis Pub/Sub. | info |
DOCKER_HOST | (Advanced) Set tcp://... for remote Docker. | unix:///var/run/docker.sock |
Logman works best when your applications output JSON logs. It automatically parses them to extract levels and metadata.
If your app logs in JSON, Logman looks for these fields:
level: "debug", "info", "warn", "error", or "fatal".msg or message: The actual log text.errorId: (Optional) A unique code for the error type (e.g., PAYMENT_GATEWAY_TIMEOUT). Highly Recommended for accurate grouping.Example:
{"level": "error", "time": 1678888, "msg": "Database connection failed", "errorId": "DB_CONN_ERR", "retry": 3}
If your app logs plain text, Logman treats the entire line as the message and defaults the level to INFO.
ERROR or FATAL levels, so plain text logs might not trigger emails unless you parse them in your app first.Logman implements a Smart Backoff strategy to prevent alert fatigue.
errorId. If no errorId is present, they may not be grouped effectively.This ensures you know immediately when an error starts, get updates if it persists, but don't get 5,000 emails for a tight loop failure.
Content type
Image
Digest
sha256:3e7adad35…
Size
6 MB
Last updated
8 months ago
docker pull gcsboss/logman