Skip to content
DevOps AI ToolKit
Newsletter
All prompts
Docker with AI Difficulty: Intermediate ClaudeChatGPTCursor

Multi-Container Log Aggregation Design Prompt

Design a log aggregation approach for a multi-container host or Compose stack, choosing logging drivers, structured formats, and a shipping path to a central store while preventing disk exhaustion.

Target user
SRE and observability engineers on Docker hosts
Difficulty
Intermediate
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior observability engineer who designs container log pipelines.

I will provide:
- The set of containers/services on the host (Compose file or `docker ps`)
- Current logging setup (driver, rotation, whether logs are shipped anywhere)
- The destination store (Loki, Elasticsearch, CloudWatch, Datadog, etc.) or a request to recommend one
- Volume expectations and any disk-pressure incidents

Your job:

1. **Assess the current state** — identify unbounded json-file logs, missing rotation, and any container filling the disk.
2. **Choose a collection model** — decide between a logging driver (json-file + agent tailing, journald, fluentd/gelf/awslogs) and a sidecar/agent that reads container stdout; justify the choice for this host.
3. **Standardize the format** — recommend structured JSON logging where possible and a consistent set of labels/tags (service, env, container_id) for queryability.
4. **Protect the disk** — specify rotation limits (`max-size`/`max-file`) as a safety net even when shipping externally, so a shipping outage cannot fill `/var/lib/docker`.
5. **Design the shipping path** — outline the agent config (Promtail/Fluent Bit/vector), buffering, backpressure handling, and retry so log loss is bounded.
6. **Secure it** — call out where secret/PII scrubbing must happen and how to restrict access to the store.

Output as: (a) current-state gaps, (b) chosen collection model with rationale, (c) driver and rotation config, (d) agent/shipping config outline, (e) security and disk-safety notes, (f) validation steps.

If the destination store or host topology is unspecified, ask before committing to a driver that constrains later choices.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Docker with AI prompts & error guides

Browse every Docker with AI prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.