# Filebeat collects incomplete data,How to solve it

**URL:** <https://discuss.elastic.co/t/filebeat-collects-incomplete-data-how-to-solve-it/355778>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 20, 2024, 2:42am UTC](https://discuss.elastic.co/t/filebeat-collects-incomplete-data-how-to-solve-it/355778 "2024-03-20T02:42:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin1811](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@kevin1811](https://discuss.elastic.co/u/kevin1811)\
**Post date:** [March 20, 2024, 2:42am UTC](https://discuss.elastic.co/t/filebeat-collects-incomplete-data-how-to-solve-it/355778/1 "2024-03-20T02:42:02Z")

</div>

When FileBeat collects a certain file, only a portion is collected, and the rest is not collected further. This problem only exists on a certain machine. Here is my FileBeat.yml, which writes a large amount of data at a certain point in time. Taking the following data as an example, only the last data of 9.40 will be collected, and the rest will not be collected. I checked log.json and found that the last offset also stays here, At the end of the file, I also checked if there is a problem with Windows. This platform is unable to upload the file, otherwise I can provide the original file  
aaa1 9.40  
aaa2 9.40  
xxxx .......  
bbb1 11.40  
bbb2 11.40  
xxxx .....

```auto
filebeat.inputs:
- type: filestream
  enabled: true
  paths:
    - C:\Users\wh\Desktop\position-test\*.txt
  fields:
    code: haiheng # 新增默认参数

output.kafka:
  hosts: ["172.19.0.139:9092"]  
  topic: "receive_item_position"
  namespace: 'kafka_output'

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 17, 2024, 4:42am UTC](https://discuss.elastic.co/t/filebeat-collects-incomplete-data-how-to-solve-it/355778/2 "2024-04-17T04:42:16Z")

</div>

Closed on April 17, 2024, 4:42am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
