The logging agent is consuming 1.5 CPU cores per node. How do you reduce it?

IntermediateScenarioLogging Pipelines
Answer

Situation read → Heavy parsing, regex, or excessive volume on the node.

What I'd do →

  1. Profile which pipeline stages use CPU (agent metrics, or pprof for Alloy/Vector).
  2. Replace regex parsing with JSON parsing or move parsing to a central aggregation tier.
  3. Drop noisy logs as early as possible (before enrichment and parsing).
  4. Batch and compress output (gzip/snappy).
  5. Set CPU limits carefully: throttling causes lag and growing buffers.

Why → Agents run on every node, so wasted CPU is multiplied by fleet size.

Interview tip → Present the cost: 1.5 cores x 300 nodes is 450 cores spent on log shipping.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines