# Logstash ignores lines of a Logfile when file is moved or copied

**URL:** https://discuss.elastic.co/t/logstash-ignores-lines-of-a-logfile-when-file-is-moved-or-copied/99863
**Category:** Logstash
**Created:** [September 8, 2017, 2:21pm UTC](https://discuss.elastic.co/t/logstash-ignores-lines-of-a-logfile-when-file-is-moved-or-copied/99863 "2017-09-08T14:21:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![TWalter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/twalter/32/41239_2.png) [@TWalter](https://discuss.elastic.co/u/TWalter)
#### Post date: [September 8, 2017, 2:21pm UTC](https://discuss.elastic.co/t/logstash-ignores-lines-of-a-logfile-when-file-is-moved-or-copied/99863/1 "2017-09-08T14:21:05Z")

</div>

Hello there,

i have the following problem with Logstash now.

A internal service copies several logfiles from a source folder to the destination folder where logstash, where logstash listens via the input plugin.

This is the configuration (simple):

input {  
file {  
type =\> "type1"  
path =\> ['path/to/file']  
}  
}

When i watch the output of logstash, i can see, that there are a lot of lines missing. This behaviour is very strange.

I tried to simulate this behaviour manually:

- I wrote a simple logfile with 6 lines of logs.
- Then I copied it into the listening directory (where the input plugin listens)
- The output of Logstash was only an empty JSON-Object and a JSON-Object with the last line of the logfile.

Does anyone know where this behaviour comes from and how i can solve the problem?

Thanks 😉

---

<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: [October 6, 2017, 2:21pm UTC](https://discuss.elastic.co/t/logstash-ignores-lines-of-a-logfile-when-file-is-moved-or-copied/99863/2 "2017-10-06T14:21:14Z")

</div>

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