# Logstash will read 3days old file

**URL:** https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950
**Category:** Logstash
**Created:** [August 4, 2017, 8:01pm UTC](https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950 "2017-08-04T20:01:45Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![P\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@P\_Kumar](https://discuss.elastic.co/u/P_Kumar)
#### Post date: [August 4, 2017, 8:01pm UTC](https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950/1 "2017-08-04T20:01:45Z")

</div>

Is it possible to logstash5 will read 3 days old SystemOut.log file ?

---

<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: [August 5, 2017, 3:34pm UTC](https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950/2 "2017-08-05T15:34:26Z")

</div>

If configured to do so Logstash will read files with any name and any age.

---

<div class="post-metadata">

### Author: ![P\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@P\_Kumar](https://discuss.elastic.co/u/P_Kumar)
#### Post date: [August 5, 2017, 5:25pm UTC](https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950/3 "2017-08-05T17:25:12Z")

</div>

I configure 5 files in one logstash configration but it is sending only 3 files to elastic serch and rest are not sending but it is showing in stdout .so i thought it may be file age.how we will debug this issue and who is blocking rest 2 files to send elstic search

---

<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: [August 5, 2017, 5:47pm UTC](https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950/4 "2017-08-05T17:47:34Z")

</div>

Show us your configuration.

---

<div class="post-metadata">

### Author: ![P\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@P\_Kumar](https://discuss.elastic.co/u/P_Kumar)
#### Post date: [August 7, 2017, 8:38pm UTC](https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950/5 "2017-08-07T20:38:05Z")

</div>

input {  
file {  
type =\> "nodeagent"  
path =\> ["/opt/WebSphere/AppServer/profiles/AppSrv01/logs/nodeagent/SystemOut.log"]  
ignore\_older =\> "400000000"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"

```
    }
    file {
            type => "websphere1"
            path => ["/opt/WebSphere/AppServer/profiles/AppSrv01/logs/App-v01/SystemOut.log"]
            ignore_older => 4
            start_position => "beginning"
            sincedb_path => "/dev/null"
    }
    file {
            type => "app1"
            path => ["/opt/WebSphere/AppServer/profiles/AppSrv01/logs/App1-v01/SystemOut.log"]
            ignore_older => 4
            start_position => "beginning"
            sincedb_path => "/dev/null"
    }
    file {
            type => "app"
            path => ["/opt/WebSphere/AppServer/profiles/AppSrv01/logs/App12Server1/SystemOut.log"]
            ignore_older => 4
            start_position => "beginning"
            sincedb_path => "/dev/null"
    }
    file{
            type => "dmgr"
            path => ["/opt/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/SystemOut.log"]
            start_position => "beginning"
            ignore_older => 4
            sincedb_path => "/dev/null"

    }

```

}

#filter {

# grok {

# match =\> ["message", "%{COMBINEDAPACHELOG}"]

# }

#}

output {  
if [type] == "nodeagent" {  
elasticsearch{  
hosts =\> ["x.x.x.x:9200"]  
index =\> "x.x.x.x\_nodeAgent\_%{+YYYY.MM.dd}"  
}  
}  
if [type] == "websphere1" {  
elasticsearch{  
hosts =\> ["x.x.x.x:9200"]  
index =\> "x.x.x.x\_App-v01\_%{+YYYY.MM.dd}"  
}  
}  
if [type] == "app1" {  
elasticsearch{  
hosts =\> ["x.x.x.x:9200"]  
index =\> "x.x.x.x\_App1-v01\_%{+YYYY.MM.dd}"  
}  
}  
if [type] == "app" {  
elasticsearch{  
hosts =\> ["x.x.x.x:9200"]  
index =\> "x.x.x.x\_App12Server1-v01\_%{+YYYY.MM.dd}"  
}  
}  
if [type] == "dmgr" {  
elasticsearch{  
hosts =\> ["x.x.x.x:9200"]  
index =\> "x.x.x.x\_dmgr\_%{+YYYY.MM.dd}"  
}  
}  
else {  
stdout{  
codec =\> rubydebug  
}  
}

}

---

<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: [August 8, 2017, 5:22am UTC](https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950/6 "2017-08-08T05:22:18Z")

</div>

If you look in your Logstash logs I'm pretty sure you'll find lots of log entries telling you that it can't create the indexes because index names must be all lowercase.

---

<div class="post-metadata">

### Author: ![P\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@P\_Kumar](https://discuss.elastic.co/u/P_Kumar)
#### Post date: [August 8, 2017, 6:54pm UTC](https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950/7 "2017-08-08T18:54:58Z")

</div>

Thanks it is working now.

---

<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 5, 2017, 6:55pm UTC](https://discuss.elastic.co/t/logstash-will-read-3days-old-file/95950/8 "2017-09-05T18:55:30Z")

</div>

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