# File Discovery in Logstash

**URL:** https://discuss.elastic.co/t/file-discovery-in-logstash/85747
**Category:** Logstash
**Created:** [May 15, 2017, 11:11am UTC](https://discuss.elastic.co/t/file-discovery-in-logstash/85747 "2017-05-15T11:11:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![thorsten1](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@thorsten1](https://discuss.elastic.co/u/thorsten1)
#### Post date: [May 15, 2017, 11:11am UTC](https://discuss.elastic.co/t/file-discovery-in-logstash/85747/1 "2017-05-15T11:11:41Z")

</div>

Hello,

my Logstash Server has an Upload-Directory where other Users can upload their Log-Files.  
Logstash is configured to listen to all files in this directory.

```
  input {
       file {
        path => "/opt/logupload/*.log"
        start_position => "beginning"
        stat_interval => 5
        codec => ...
        }
      }

```

When I have uploaded a new file, nothing happen's in Logstash. But when I stop my Logstash-Service it begin to parse the file.

Do you have an idea, why the parsing only starts when the service will be stopped?

---

<div class="post-metadata">

### Author: ![thorsten1](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@thorsten1](https://discuss.elastic.co/u/thorsten1)
#### Post date: [May 19, 2017, 8:37am UTC](https://discuss.elastic.co/t/file-discovery-in-logstash/85747/2 "2017-05-19T08:37:03Z")

</div>

Did I use the wrong Plugin?

---

<div class="post-metadata">

### Author: ![Nico-DF](https://avatars.discourse-cdn.com/v4/letter/n/ed8c4c/32.png) [@Nico-DF](https://discuss.elastic.co/u/Nico-DF)
#### Post date: [May 19, 2017, 8:52am UTC](https://discuss.elastic.co/t/file-discovery-in-logstash/85747/3 "2017-05-19T08:52:42Z")

</div>

It used to happend to me when I used multiline plugin. It waits until the end match, but when you stop it, it will push the event regardless of the end matched or not.

Do you have any aggregation or multiline that might cause this?

---

<div class="post-metadata">

### Author: ![thorsten1](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@thorsten1](https://discuss.elastic.co/u/thorsten1)
#### Post date: [May 19, 2017, 9:24am UTC](https://discuss.elastic.co/t/file-discovery-in-logstash/85747/4 "2017-05-19T09:24:02Z")

</div>

Yes I use multiline codec in this way:

```
   codec => multiline {
     pattern => "^%{MONTH}%{SPACE}%{MONTHDAY}|^%{HOUR}:%{MINUTE}:%{SECOND}"
     negate => true
     what => previous
   }
   ...
```

---

<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: [June 16, 2017, 9:24am UTC](https://discuss.elastic.co/t/file-discovery-in-logstash/85747/5 "2017-06-16T09:24:14Z")

</div>

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