elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
12.17k stars 4.92k forks source link

[Filestream] Filestream add flag to only terminate the input after reaching EOF on all files #40447

Open belimawr opened 2 months ago

belimawr commented 2 months ago

When Filebeat is running with autodiscover enabled it can happen that a pod is terminated, autodiscover signals to terminate the input, but the files have not been read until EOF. Terminating the input on this state will lead to the file not being fully ingested.

There are at least a couple of common cases where this happens:

Currently the best way to avoid data loss on those situations is to set close.on_state_change.removed: false in the input configuration and cleanup_timeout for the autodiscover configuration to a value that will give Filebeat enough time to ingest all data.

elasticmachine commented 2 months ago

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)