# Index files from a directory that has new file every minute

**URL:** <https://discuss.elastic.co/t/index-files-from-a-directory-that-has-new-file-every-minute/24658>\
**Category:** Logstash\
**Created:** [June 30, 2015, 7:20pm UTC](https://discuss.elastic.co/t/index-files-from-a-directory-that-has-new-file-every-minute/24658 "2015-06-30T19:20:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vgupta](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@vgupta](https://discuss.elastic.co/u/vgupta)\
**Post date:** [June 30, 2015, 7:20pm UTC](https://discuss.elastic.co/t/index-files-from-a-directory-that-has-new-file-every-minute/24658/1 "2015-06-30T19:20:48Z")

</div>

Hi

I need to index files from directory where new logs files are written every minute. What will be the best solution?

thanks  
Vinay

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 30, 2015, 8:40pm UTC](https://discuss.elastic.co/t/index-files-from-a-directory-that-has-new-file-every-minute/24658/2 "2015-06-30T20:40:36Z")

</div>

Use the [file input](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html) with a wildcard pattern. New files will by default get picked up within 15 seconds (see the [`discover_interval` parameter](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-discover_interval)).

---

<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:35am UTC](https://discuss.elastic.co/t/index-files-from-a-directory-that-has-new-file-every-minute/24658/3 "2017-07-06T05:35:57Z")

</div>


