# Logstash configuration File

**URL:** https://discuss.elastic.co/t/logstash-configuration-file/296179
**Category:** Logstash
**Created:** [February 3, 2022, 10:59am UTC](https://discuss.elastic.co/t/logstash-configuration-file/296179 "2022-02-03T10:59:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![harsh19](https://avatars.discourse-cdn.com/v4/letter/h/ed655f/32.png) [@harsh19](https://discuss.elastic.co/u/harsh19)
#### Post date: [February 3, 2022, 10:59am UTC](https://discuss.elastic.co/t/logstash-configuration-file/296179/1 "2022-02-03T10:59:14Z")

</div>

```auto
input {
  file {
    type => "json"
    path => "/home/harsh/Documents/elklog/2022/01/1/*.json"
    start_position => "beginning"
    sincedb_path => "/dev/null"
  }
}

filter {

}

output {
  stdout { codec => rubydebug }
  elasticsearch{
	hosts => ["localhost:9200"]
	user => elastic
    password => elastic
    index => "logstash_index"
    document_type => "json"
  }
}

```

in this configuration file,  
I want to change path Dynamically so is it possible or not ? If yes then How to do that ?

---

<div class="post-metadata">

### Author: ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)
#### Post date: [February 3, 2022, 11:06am UTC](https://discuss.elastic.co/t/logstash-configuration-file/296179/2 "2022-02-03T11:06:01Z")

</div>

What does "change path dynamically" mean?

---

<div class="post-metadata">

### Author: ![harsh19](https://avatars.discourse-cdn.com/v4/letter/h/ed655f/32.png) [@harsh19](https://discuss.elastic.co/u/harsh19)
#### Post date: [February 3, 2022, 11:11am UTC](https://discuss.elastic.co/t/logstash-configuration-file/296179/3 "2022-02-03T11:11:56Z")

</div>

Suppose i have Folder like YYYY/MM/DD in year there is all Months folder so i want to need specific folder log data so All time i have to change in conf file so is it any way to create path Dynamically so my work done easily hope you got my point

Thank you @Tomo_M

---

<div class="post-metadata">

### Author: ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)
#### Post date: [February 3, 2022, 11:17am UTC](https://discuss.elastic.co/t/logstash-configuration-file/296179/4 "2022-02-03T11:17:10Z")

</div>

You can use wildcard even for folder path not only for file name. Is this help you?

> **[File input plugin | Logstash Reference \[7.17\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-path)**

---

<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: [March 3, 2022, 11:17am UTC](https://discuss.elastic.co/t/logstash-configuration-file/296179/5 "2022-03-03T11:17:37Z")

</div>

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