# Logstash Ingesting Daily JSON Files

**URL:** <https://discuss.elastic.co/t/logstash-ingesting-daily-json-files/211153>\
**Category:** Logstash\
**Created:** [December 9, 2019, 4:07pm UTC](https://discuss.elastic.co/t/logstash-ingesting-daily-json-files/211153 "2019-12-09T16:07:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Booooooo](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@Booooooo](https://discuss.elastic.co/u/Booooooo)\
**Post date:** [December 9, 2019, 4:07pm UTC](https://discuss.elastic.co/t/logstash-ingesting-daily-json-files/211153/1 "2019-12-09T16:07:10Z")

</div>

Hello,

I am working in a setup on which Logstash will look into a local specific directory for JSON files to parse and forward to Elasticsearch. Those files will be generated daily and placed on the directory where Logstash is monitoring, so there will be a new uniquely named JSON file every day.

My input is as such:

```
input {
    file {
        path => "/home/path_to_json/*.json"
        start_position => "beginning"
        sincedb_path => "/dev/null"
    }
}

```

My question is, how do I configure Logstash to only ingest the latest/newest file, and not everthing else on the directory everytime a new file gets dumped, so that it will not duplicate data on Elasticsearch? Is this the default behavior of the **File** plugin? Or should I set up anything new on my input?

Thanks in advance!

---

<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:** [January 6, 2020, 4:07pm UTC](https://discuss.elastic.co/t/logstash-ingesting-daily-json-files/211153/2 "2020-01-06T16:07:17Z")

</div>

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