# Input file plugin under Windows is continuously looping through the file

**URL:** https://discuss.elastic.co/t/input-file-plugin-under-windows-is-continuously-looping-through-the-file/1229
**Category:** Logstash
**Created:** [May 24, 2015, 1:15pm UTC](https://discuss.elastic.co/t/input-file-plugin-under-windows-is-continuously-looping-through-the-file/1229 "2015-05-24T13:15:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![discuss03](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@discuss03](https://discuss.elastic.co/u/discuss03)
#### Post date: [May 24, 2015, 1:15pm UTC](https://discuss.elastic.co/t/input-file-plugin-under-windows-is-continuously-looping-through-the-file/1229/1 "2015-05-24T13:15:02Z")

</div>

I am trying to use **logstash under WIndows** (don't ask)... and everything seems fine, my logstash configuration the input file definition, the grok filter, and my output to debug and elastic search...

In order to test I used a small 10 line file (syslog format) and I noticed that the logstash agent is continuously reading the file and re-inserting the same lines over and over, hence the number of entries keeps on multiplying - at this point after 10 minutes, I have over 423 docs (I started from 0) in my current logstash-\* index.

This is a test environment so there are no others pushing data into the elastic search by me... and only 1 logstash.

Here is y definition:

input {  
file {  
path =\> "e:/logs/\*.txt"  
type =\> "syslog"  
#delimiter =\> "\n\r"  
#start\_position =\> "beginning"  
}  
}  
filter {  
grok {  
patterns\_dir =\> "c:/logstash/grok\_patterns"  
match =\> { "message" =\> "%{DATE\_SYSLOG:syslog\_timestamp} %{DATA:syslog\_category} %{IPORHOST:host} %{GREEDYDATA:message}" }  
overwrite =\> ["message", "host"]  
add\_tag =\> ["network"]  
tag\_on\_failure =\> ["BadBadSucks"]  
}  
grok {  
patterns\_dir =\> "c:/logstash/grok\_patterns"  
match =\> { "message" =\> "%{DATE\_FIREWALL:firewall\_timestamp}: %{DATA:fw\_event} %{GREEDYDATA:message}" }  
add\_tag =\> ["%{fw\_event}", "firewall"]  
tag\_on\_failure =\> ["BadBadSucks2"]  
}  
date {  
match =\> ["syslog\_timestamp" , "YYYY-MM-dd HH:mm:ss"]  
}  
}  
output {  
stdout {  
codec =\> rubydebug  
}  
elasticsearch{  
host =\> "127.0.0.1"  
}  
}

Any help is greatly appreciated.

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: [July 6, 2017, 5:39am UTC](https://discuss.elastic.co/t/input-file-plugin-under-windows-is-continuously-looping-through-the-file/1229/2 "2017-07-06T05:39:24Z")

</div>


