# Best way to parse a log folder

**URL:** <https://discuss.elastic.co/t/best-way-to-parse-a-log-folder/124992>\
**Category:** Logstash\
**Created:** [March 21, 2018, 1:20pm UTC](https://discuss.elastic.co/t/best-way-to-parse-a-log-folder/124992 "2018-03-21T13:20:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sana](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sana](https://discuss.elastic.co/u/sana)\
**Post date:** [March 21, 2018, 1:20pm UTC](https://discuss.elastic.co/t/best-way-to-parse-a-log-folder/124992/1 "2018-03-21T13:20:11Z")

</div>

i have 6 folders,, at the end of the day a new log file is added to each folder, i used logstash file input to parse the old files to logstash  
file {

```
path => "/home/sana/pfe/docker/logs/**/*.log"
type => "syslog"
 start_position => "beginning"
 sincedb_path => "/dev/null" 
 #ignore_older => 0

```

codec =\> multiline {  
pattern =\> "^(%{TIMESTAMP\_ISO8601})"  
negate =\> true  
what =\> "previous"  
}  
}  
what configuration i should add so logstash bring the new files automatically to elascticsearch whithout this  
/usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf --config.reload.automatic

---

<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:** [March 22, 2018, 9:03pm UTC](https://discuss.elastic.co/t/best-way-to-parse-a-log-folder/124992/2 "2018-03-22T21:03:58Z")

</div>

Just run Logstash all the time. It'll re-expand all filename patterns periodically (by default every 15 seconds I think) so new files will be picked up automatically.

---

<div class="post-metadata">

**Author:** ![sana](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@sana](https://discuss.elastic.co/u/sana)\
**Post date:** [March 23, 2018, 5:01pm UTC](https://discuss.elastic.co/t/best-way-to-parse-a-log-folder/124992/3 "2018-03-23T17:01:48Z")

</div>

thank you, this is the information i've been looking for

---

<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 20, 2018, 5:02pm UTC](https://discuss.elastic.co/t/best-way-to-parse-a-log-folder/124992/4 "2018-04-20T17:02:02Z")

</div>

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