# Multiple file input and GROK filters and single ES output

**URL:** <https://discuss.elastic.co/t/multiple-file-input-and-grok-filters-and-single-es-output/51059>\
**Category:** Logstash\
**Created:** [May 26, 2016, 12:35pm UTC](https://discuss.elastic.co/t/multiple-file-input-and-grok-filters-and-single-es-output/51059 "2016-05-26T12:35:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sukhada369](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sukhada369](https://discuss.elastic.co/u/sukhada369)\
**Post date:** [May 26, 2016, 12:35pm UTC](https://discuss.elastic.co/t/multiple-file-input-and-grok-filters-and-single-es-output/51059/1 "2016-05-26T12:35:27Z")

</div>

I am using a single Logstash config file for multiple file inputs and grok filters and single ES output. The problem is that, it goes in infinite loop and I don't know why. I created separate files to check on if GROK is working fine for respective logs and it works fine. Then I merged the content and did configtest as well.  
Logical part:  
#----------Start-----  
input {  
file {  
#TypeA  
#path for file A  
}  
file {  
#TypeB  
#path for file B  
}  
}

filter {  
if [type="A"] {  
#GROK for A  
}  
}

filter {  
if [type="B"] {  
#GROK for B  
}  
}

output {  
elasticsearch {  
#output config for elasticsearch  
}  
}  
#----------End-----

Please guide me for same

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 26, 2016, 10:06pm UTC](https://discuss.elastic.co/t/multiple-file-input-and-grok-filters-and-single-es-output/51059/2 "2016-05-26T22:06:53Z")

</div>

> [@sukhada369](#):
>
> The problem is that, it goes in infinite loop and I don't know why

Can you elaborate, what do you mean here?

---

<div class="post-metadata">

**Author:** ![sukhada369](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sukhada369](https://discuss.elastic.co/u/sukhada369)\
**Post date:** [May 31, 2016, 6:49am UTC](https://discuss.elastic.co/t/multiple-file-input-and-grok-filters-and-single-es-output/51059/3 "2016-05-31T06:49:54Z")

</div>

I am running logstash manually i.e. (logstash -f /path/to/config/file -v). And after I execute the commad I can see all the logs getting parsed and it continues unless I stop it manually. Also there is no index created in ES for the logs being parsed.

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [May 31, 2016, 11:36am UTC](https://discuss.elastic.co/t/multiple-file-input-and-grok-filters-and-single-es-output/51059/4 "2016-05-31T11:36:04Z")

</div>

I think you are experiencing the ignore\_older feature.

By default the file input will ignore any files that are older than 24 hours.

Add `ignore_older => 0` to disable this feature.

---

<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, 4:55am UTC](https://discuss.elastic.co/t/multiple-file-input-and-grok-filters-and-single-es-output/51059/5 "2017-07-06T04:55:16Z")

</div>


