# Logstash File input filter, ingest twice same file name

**URL:** https://discuss.elastic.co/t/logstash-file-input-filter-ingest-twice-same-file-name/244385
**Category:** Logstash
**Created:** [August 10, 2020, 10:57am UTC](https://discuss.elastic.co/t/logstash-file-input-filter-ingest-twice-same-file-name/244385 "2020-08-10T10:57:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nahiko2000](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@nahiko2000](https://discuss.elastic.co/u/nahiko2000)
#### Post date: [August 10, 2020, 10:57am UTC](https://discuss.elastic.co/t/logstash-file-input-filter-ingest-twice-same-file-name/244385/1 "2020-08-10T10:57:15Z")

</div>

Hi!

Using Logstash File Input Filter, I will ingest text files (actually they will be .gz files) that are "finished" (I mean, they will not be written anymore)  
When ingest gets done, file must be automatically deleted (Logstash must delete it)

It works fine, however, when I try to ingest for a second time the same file name, with the same content (I guess the content does not matter) it does nothing, the file does not get processed by Logstash, it does not ingest into Elasticsearch, and it does not get deleted.

Files are copied from a remote server to Logstash server filesystem, so I guess even when file names does not change, inodes does everytime.

I tryed dome input filter configuration but I do not get it to work:

```
input {
  file {
    id => "inputTest"
    path => "/path/to/files/*.gz"
    mode => read
    #ignore_older => 0
    #sincedb_path => "/dev/null"
	sincedb_path => "/path/to/files/sincedb_test.txt"
  }
}

```

I played with ignore\_older setting it to 0, deleting every time sincedb\_test.txt file or its content, but it does not work.  
Without sincedb\_path and with ignore\_older=0 it works once, but to get it to work again I have to delete de ignore\_older param, and then set it again.

Which would be the config I'd need to get it working?

Thanks a lot!!

---

<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: [August 10, 2020, 1:27pm UTC](https://discuss.elastic.co/t/logstash-file-input-filter-ingest-twice-same-file-name/244385/2 "2020-08-10T13:27:36Z")

</div>

Does sincedb\_clean\_after help? (Make sure you read [this](https://github.com/logstash-plugins/logstash-input-file/issues/231) thread.)

Setting ignore\_older to zero in filebeat turns off age based filtering.

Setting ignore\_older to zero in a file input tells it to ignore any files older than zero seconds, so unless filewatch spots the file immediately it will ignore it.

---

<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: [September 7, 2020, 1:27pm UTC](https://discuss.elastic.co/t/logstash-file-input-filter-ingest-twice-same-file-name/244385/3 "2020-09-07T13:27:41Z")

</div>

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