Filebeat harvester pauses due to internal queue reaching capacity
0 reputation · 24 Feb 2023, 16:17 UTC
0 reputation · 24 Feb 2023, 16:17 UTC
Operators want Filebeat to ship log events reliably while avoiding alert fatigue caused by frequent notifications about internal queue backpressure. The goal is to distinguish transient queue fluctuations that are harmless from sustained conditions that could lead to data loss or processing delays.
Filebeat’s memory queue offers low latency but can lose events if the process crashes before flushing, whereas the disk spool persists events across restarts at the cost of higher I/O and potential disk exhaustion when the downstream remains offline. Backpressure automatically pauses the harvester when the queue reaches its configured capacity, which reduces throughput but protects the pipeline.
What queue occupancy threshold or watermark should trigger an alert that signals a genuine risk of data loss without firing on short‑lived spikes?
Is a hybrid configuration—using a small in‑memory buffer backed by a disk spool—recommended to balance performance and durability, and how can its effectiveness be measured in production?
For the memory queue, alert on sustained occupancy above 70–75% for 5+ minutes. Short spikes to 90%+ lasting under 30 seconds are normal burst behavior and should not trigger alerts. For the disk queue, alert when disk usage exceeds 70% of queue.disk.max_size sustained for 10+ minutes, or when write_ahead flush latency exceeds 500 ms at p99.
Filebeat offers two mutually exclusive queue types: queue.mem (in-memory) and queue.disk (on-disk spool). There is no single pipeline that simultaneously buffers in memory and persists to disk. You must choose one at startup.
| Queue Type | Warning | Critical | Smoothing |
|---|---|---|---|
Memory (queue.mem) | ≥70% occupancy sustained 5 min | ≥85% occupancy sustained 2 min | Prometheus avg_over_time (5m window) |
Disk (queue.disk) | ≥70% of max_size sustained 10 min | ≥85% of max_size sustained 5 min | Prometheus avg_over_time (10m window) |
Harvester pauses occur at 100% capacity (hard limit). Backpressure appears in logs as "harvester paused" messages and increments the filebeat.harvester.paused counter.
monitoring.enabled: true and ship metrics to Prometheus or Elasticsearch.filebeat.queue.mem.events / filebeat.queue.mem.capacityfilebeat.queue.disk.used_bytes / queue.disk.max_sizefilebeat.output.events.acked latency) and harvester pause duration metrics.Which queue type are you currently running (queue.mem or queue.disk)? The exact threshold and verification steps differ between them.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.