# Filebeat isn’t shipping the last line of a file

**URL:** <https://discuss.elastic.co/t/filebeat-isn-t-shipping-the-last-line-of-a-file/277459>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 30, 2021, 12:36pm UTC](https://discuss.elastic.co/t/filebeat-isn-t-shipping-the-last-line-of-a-file/277459 "2021-06-30T12:36:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jack5](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jack5](https://discuss.elastic.co/u/jack5)\
**Post date:** [June 30, 2021, 12:36pm UTC](https://discuss.elastic.co/t/filebeat-isn-t-shipping-the-last-line-of-a-file/277459/1 "2021-06-30T12:36:17Z")

</div>

Hi everyone,

I'm new in filebeat, I'm using filebeat+ingest node pipeline to send csv properties into elasticsearch. Unfortunately filebeat doesn't send last line of my csv file. I read [https://www.elastic.co/guide/en/beats/filebeat/current/newline-character-required-eof.html](https://www.elastic.co/guide/en/beats/filebeat/current/newline-character-required-eof.html)  
but I haven't got idea how to handle it. Could you give me some tips how to resolve this case?  
Is it possible to fix it using filebeat, ingest pipeline config or I have to add newline character manually?

My example config:

filebeat.yml

```auto
filebeat.inputs:
- type: log
  paths:
     - /data/*.csv
  pipeline: "my_pipe"
  index: "my_index"

```

data.csv

```auto
 xyz|xyz
 xyz|xyz
 xyz|xyz

```

my\_pipe

```auto
PUT _ingest/pipeline/my_pipe
    {
    "processors": [
    {
        "grok": {
        "field": "message",
        "patterns": [
            "%{DATA:val1}\\|%{DATA:val2}"
        ]
        }
    },
   {
     "remove":{
        "field":"message"
     }
  }
    ],
    "on_failure" : [
        {
        "set" : {
            "field" : "error",
            "value" : "Error processing message"
        }
        }
    ]
    }

```

Thanks,  
jack5

---

<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:** [July 28, 2021, 2:36pm UTC](https://discuss.elastic.co/t/filebeat-isn-t-shipping-the-last-line-of-a-file/277459/2 "2021-07-28T14:36:43Z")

</div>

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