# How do I properly configure input to Logstash for a rewritable file?

**URL:** https://discuss.elastic.co/t/how-do-i-properly-configure-input-to-logstash-for-a-rewritable-file/267089
**Category:** Logstash
**Created:** [March 12, 2021, 1:01pm UTC](https://discuss.elastic.co/t/how-do-i-properly-configure-input-to-logstash-for-a-rewritable-file/267089 "2021-03-12T13:01:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Andrew\_Foxis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_foxis/32/69811_2.png) [@Andrew\_Foxis](https://discuss.elastic.co/u/Andrew_Foxis)
#### Post date: [March 12, 2021, 1:01pm UTC](https://discuss.elastic.co/t/how-do-i-properly-configure-input-to-logstash-for-a-rewritable-file/267089/1 "2021-03-12T13:01:46Z")

</div>

Hi all!

I have csv file, It is overwritten every 5 minutes.

I have already configured input, filter,output.

But in the current configuration I only get new lines from the file in the index.  
But I need to have all the entire contents of the file sent to me every 5 minutes.  
How can this be done? Thank you in advance

current input configuration:

```
input {
    file {
        type => "clients"
        path => "/opt/clients/clients-out.csv"
        sincedb_path => "/opt/clients/.sincedb"
        start_position => "beginning"
    }
}
```

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [March 12, 2021, 3:54pm UTC](https://discuss.elastic.co/t/how-do-i-properly-configure-input-to-logstash-for-a-rewritable-file/267089/2 "2021-03-12T15:54:32Z")

</div>

I have never tried it but you may be able to do it by setting close\_older and sincedb\_clean\_after to small enough values.

---

<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: [April 9, 2021, 3:55pm UTC](https://discuss.elastic.co/t/how-do-i-properly-configure-input-to-logstash-for-a-rewritable-file/267089/3 "2021-04-09T15:55:22Z")

</div>

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