# Logstash not reading files

**URL:** <https://discuss.elastic.co/t/logstash-not-reading-files/60273>\
**Category:** Logstash\
**Created:** [September 12, 2016, 10:00am UTC](https://discuss.elastic.co/t/logstash-not-reading-files/60273 "2016-09-12T10:00:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![debarun](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@debarun](https://discuss.elastic.co/u/debarun)\
**Post date:** [September 12, 2016, 10:00am UTC](https://discuss.elastic.co/t/logstash-not-reading-files/60273/1 "2016-09-12T10:00:58Z")

</div>

Hi,

I have a logstash installation, and it suddenly has stopped reading from files. The sincedb\_path is created but files are not read. I have tried only stdin and stdout, and that works

Below is the config file:-  
input {  
file {  
path =\> "/apps/elk/rawfiles/hostd.log"  
start\_position =\> beginning  
sincedb\_path =\> '/opt/logstash/hostd.db'  
sincedb\_write\_interval =\> 0  
type =\> 'hostdlog'  
}  
}

filter {

multiline {  
patterns\_dir =\> ["/etc/logstash/conf.d/pattern"]  
pattern =\> "%{DATE\_YMD}"  
negate =\> true  
what =\> "previous"  
}

grok {  
patterns\_dir =\> ["/etc/logstash/conf.d/pattern"]  
match =\> ["message","%{DATE\_YMD:logdate}T%{TIME:logtime}Z [%{DATA}](?\<log\_message\>.\*$)" ]

mutate { replace =\> ["message", "%{log\_message}"] }

}

output {

```
                                                                    elasticsearch {
                                                                    hosts => ["localhost:9200"]
                                                                    index => 'hostd'
                                                                    }
                                                                    stdout {
                                                                                    codec => rubydebug
                                                                                    }

            }

```

Regards,  
Debarun.

---

<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:** [September 12, 2016, 10:45am UTC](https://discuss.elastic.co/t/logstash-not-reading-files/60273/2 "2016-09-12T10:45:17Z")

</div>

If the input file is older than 24 hours you need to adjust the file input's `ignore_older` option. If that doesn't help, what's in the sincedb file? Does Logstash think it has reached the end of the file?

---

<div class="post-metadata">

**Author:** ![debarun](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@debarun](https://discuss.elastic.co/u/debarun)\
**Post date:** [September 12, 2016, 11:39am UTC](https://discuss.elastic.co/t/logstash-not-reading-files/60273/3 "2016-09-12T11:39:25Z")

</div>

Thanks Magnus. The ignore\_older option worked like a charm.

---

<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:** [July 6, 2017, 4:38am UTC](https://discuss.elastic.co/t/logstash-not-reading-files/60273/4 "2017-07-06T04:38:59Z")

</div>


