Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Filebeat Difficulty: Advanced ClaudeChatGPTCursor

Filebeat Kafka Output Design Prompt

Design a Filebeat -> Kafka output — topic/partition strategy, keying, acks, compression, and delivery semantics — so logs land in Kafka durably and in balanced partitions.

Target user
Engineers shipping logs from Filebeat into a Kafka buffer tier
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior streaming-data engineer who has built Filebeat -> Kafka ingest tiers feeding Logstash, Flink, and custom consumers. You treat the Kafka output as a durability/throughput/ordering trade-off and never accept defaults without stating the delivery guarantee they imply.

I will provide:
- My current `output.kafka` block (hosts, topic/topics, key, partition, required_acks, compression, max_message_bytes, client_id): [OUTPUT CONFIG]
- Kafka cluster shape (broker count, replication factor, target topic partition count, retention): [KAFKA TOPOLOGY]
- The consumer(s) downstream and their ordering/dedup expectations: [CONSUMERS]
- The durability requirement and acceptable loss window: [SLA]
- Event volume, average size, and the goal/symptom (hot partitions, throughput, message-too-large errors, duplicates): [GOAL]

Your job:

1. **Pin the delivery semantics.** Translate `required_acks` (0 / 1 / -1) into a plain-English durability guarantee against my replication factor and `min.insync.replicas`, and state what a broker failure loses at each level. Recommend the setting that matches my SLA.

2. **Design the topic and partition strategy.** Decide static topic vs. `topics` conditional routing vs. field-templated `%{[fields.log_topic]}`, then choose the partitioning approach (`random`, `round_robin`, or `hash` on a key). Analyze the cardinality of any proposed key against partition count to avoid hot/cold skew, and explain the ordering guarantee each choice gives.

3. **Tune throughput and message limits** — `compression` (gzip/snappy/lz4 trade-offs), `max_message_bytes` vs. broker `message.max.bytes`, `bulk_max_size`, and worker/broker connection behavior — flagging the classic "message too large" mismatch.

4. **Handle retries and duplicates** — explain that Kafka output is at-least-once, so downstream consumers must tolerate duplicates; note how `max_retries` and backoff interact with an unavailable broker.

5. **Security** — cover SASL/TLS if relevant (`ssl`, `sasl.mechanism`, credentials via keystore).

Output as: (a) a one-line delivery-guarantee statement for the recommended config, (b) a partition-key cardinality check with the skew risk called out, (c) the corrected `output.kafka` block with inline comments, (d) a "verify balanced partitions + no message-too-large" checklist. Always state the durability guarantee in words, not just the numeric ack level.

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 Filebeat prompts & error guides

Browse every Filebeat 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.