Logstash is the bottleneck in your ELK pipeline with 100% CPU. What do you do?

AdvancedScenarioLogging Pipelines
Answer

Situation read → Heavy grok parsing and a single pipeline on JVM Logstash nodes.

What I'd do →

  1. Use the Logstash monitoring API (GET _node/stats/pipelines) to find the slowest filter.
  2. Replace grok with dissect or JSON parsing where possible; anchor grok patterns (^...$).
  3. Increase pipeline.workers and pipeline.batch.size, enable persistent queues.
  4. Move parsing to the edge (structured logs from apps, or Fluent Bit/Vector parsing).
  5. Consider replacing Logstash with Elasticsearch ingest pipelines or Vector for lower resource use.

Why → Most Logstash CPU goes to regex; avoiding regex is the biggest win.

Interview tip → Unanchored grok patterns that fail to match are the most expensive case.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines