Single line text data is truncated

When there are multiple line breaks at the end of my file, the last valid complete text message will be truncated based on the number of line breaks at the end of the text
txt file
{"b":"001T230197002","t":"E0040150ED4E9785","p":"春楮径04排6架1层","d":"2024-01-10 16:55:46","s":"off","c":"2024-01-10 16:55:47"}
{"b":"001T230197002","t":"E0040150ED4E9785","p":"春楮径04排6架1层","d":"2024-01-10 16:55:46","s":"off","c":"2024-01-10 16:55:47"}
{"b":"001T230197002","t":"E0040150ED4E9785","p":"春楮径04排6架1层","d":"2024-01-10 16:55:46","s":"off","c":"2024-01-10 16:55:47"}

kafka message
{
"@timestamp": "2024-01-10T09:59:08.542Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "8.11.3"
},
"message": ":"001T230197002","t":"E0040150ED4E9785","p":"春楮径04排6架1层","d":"2024-01-10 16:55:46","s":"off","c":"2024-01-10 16:55:47"}",
"input": {
"type": "filestream"
},
"fields": {
"code": "haiheng"
},
"agent": {
"name": "LAPTOP-QSUR4HJI",
"type": "filebeat",
"version": "8.11.3",
"ephemeral_id": "6d8df0e0-0648-4192-a50c-cfbe51ca89ee",
"id": "3aca8496-bbf4-4f1e-95af-2439bfd7c7fc"
},
"ecs": {
"version": "8.0.0"
},
"host": {
"name": "LAPTOP-QSUR4HJI"
},
"log": {
"offset": 415,
"file": {
"idxlo": "330994",
"vol": "3973286738",
"path": "C:\Users\wh\Desktop\position\B-2024-01-05.txt",
"idxhi": "11993088"
}
}
}
The message section has been truncated by 3 digits, which is the number of 3 line breaks

Can you share your filebeat.yml?

It looks like that's been truncated by 4 digits?

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