# Configuring logstash to Check files automatically

**URL:** https://discuss.elastic.co/t/configuring-logstash-to-check-files-automatically/48647
**Category:** Logstash
**Created:** [April 28, 2016, 8:35am UTC](https://discuss.elastic.co/t/configuring-logstash-to-check-files-automatically/48647 "2016-04-28T08:35:26Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![maher](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@maher](https://discuss.elastic.co/u/maher)
#### Post date: [April 28, 2016, 8:35am UTC](https://discuss.elastic.co/t/configuring-logstash-to-check-files-automatically/48647/1 "2016-04-28T08:35:26Z")

</div>

Hi,

I am trying to configure logstash to automatically wake up when a new file apears or when a file is modified.  
For sure I can use a script to execute logstash periodically...  
But is there any other alternative?  
like some configuration for logstash?

Thank you!

---

<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: [April 28, 2016, 7:38pm UTC](https://discuss.elastic.co/t/configuring-logstash-to-check-files-automatically/48647/2 "2016-04-28T19:38:06Z")

</div>

Logstash's file input is specifically designed to monitor files and send new data as it arrives, including picking up new files that are added. What have you tried so far that isn't working?

---

<div class="post-metadata">

### Author: ![maher](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@maher](https://discuss.elastic.co/u/maher)
#### Post date: [April 29, 2016, 9:06am UTC](https://discuss.elastic.co/t/configuring-logstash-to-check-files-automatically/48647/3 "2016-04-29T09:06:29Z")

</div>

Thank you,

that's all i needed to know,  
can I configure logstash to increase the sleep time?  
or to specify a sleep time for each file type?

---

<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: [April 30, 2016, 2:52pm UTC](https://discuss.elastic.co/t/configuring-logstash-to-check-files-automatically/48647/4 "2016-04-30T14:52:49Z")

</div>

> can I configure logstash to increase the sleep time?

Yes. See the file input documentation for what configuration options are supported.

> or to specify a sleep time for each file type?

Not within a single file input but you can have multiple file inputs that monitors different kinds of files.

---

<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:59am UTC](https://discuss.elastic.co/t/configuring-logstash-to-check-files-automatically/48647/5 "2017-07-06T04:59:54Z")

</div>


