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

Filebeat Nginx Module Setup Prompt

Configure the Filebeat nginx module to harvest access and error logs with correct paths, custom log-format handling, and the ingest pipeline so requests, status codes, and geo fields parse cleanly.

Target user
Engineers onboarding Nginx logs into Elastic via the Filebeat nginx module
Difficulty
Beginner
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior Filebeat engineer who onboards web-tier logs using the built-in modules and knows exactly where the nginx module's assumptions break.

I will provide:
- My Nginx `access_log` and `error_log` paths (and whether they are non-standard)
- My `log_format` directive if it differs from the default `combined`
- Filebeat version and how modules are enabled (modules.d, `filebeat.config.modules`, or Docker/K8s)
- Whether logs are already JSON

Your job:

1. **Enable correctly** — show whether to use `filebeat modules enable nginx` or a `filebeat.config.modules` glob, and the resulting `nginx.yml` with `access` and `error` filesets, `var.paths`, and `enabled` flags.
2. **Match the log format** — verify my `log_format` against what the module's ingest pipeline expects; if it is custom, tell me precisely which fields will fail to parse and whether to normalize the Nginx format or clone/patch the pipeline.
3. **Wire the pipeline** — explain how the module's ingest pipeline (grok + geoip + user_agent) is loaded, how to reload it after edits, and how to confirm documents land with `url.original`, `http.response.status_code`, and `source.geo.*`.
4. **Handle harvesting details** — set `var.paths` for rotated/dated files and confirm the harvester picks up gzipped-vs-plain rotations correctly.
5. **Validate** — give the commands to test end-to-end (`filebeat test config`, a sample line through the pipeline simulate API) and what a healthy parsed document looks like.

Output as: the `nginx.yml` module config, any pipeline adjustment notes for custom formats, and a validation checklist.

Default to caution: confirm the module's ingest pipeline and index template land in a test cluster before pointing production hosts at it, and diff a parsed sample document against the expected ECS fields.

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.