# Not able to feed log file to Elasticsearch through Logstash

**URL:** <https://discuss.elastic.co/t/not-able-to-feed-log-file-to-elasticsearch-through-logstash/46062>\
**Category:** Logstash\
**Created:** [April 1, 2016, 12:45pm UTC](https://discuss.elastic.co/t/not-able-to-feed-log-file-to-elasticsearch-through-logstash/46062 "2016-04-01T12:45:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mshar039](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mshar039](https://discuss.elastic.co/u/mshar039)\
**Post date:** [April 1, 2016, 12:45pm UTC](https://discuss.elastic.co/t/not-able-to-feed-log-file-to-elasticsearch-through-logstash/46062/1 "2016-04-01T12:45:51Z")

</div>

I am trying to feed a log file through logstash into elasticsearch. My logstash config file is:

```
input {
  file {
    path => "/root/Desktop/Graylog/SB_log.txt"
    start_position => "beginning"
    type => "logs"
    sincedb_path => "/dev/null"
  }
}
filter {
  if [type] == "logs" {
    mutate {
      add_field => {"message" => "%{Message}"}
   }
  }
}
output {
  elasticsearch {
    hosts => ["127.0.0.1"]
 }
}

```

Neither the output is working for stdout {} nor for gelf {}. And it also doesn't show any error.

On running Logstash i get the following and it does nothing after that..

[root@localhost logstash]# bin/logstash -f logstash-config.conf  
Settings: Default pipeline workers: 4  
Logstash startup completed

and it stays like this. Tried with stdout {} and am getting the same.

Kindly help me with its reason and solution.  
Thanks.

---

<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:** [April 2, 2016, 6:26pm UTC](https://discuss.elastic.co/t/not-able-to-feed-log-file-to-elasticsearch-through-logstash/46062/2 "2016-04-02T18:26:55Z")

</div>

As this is a Logstash question rather than an ES question I suggest you edit your post and change the category to Logstash.

Perhaps SB\_log.txt is older than 24 hours and you need to adjust the file input's `ignore_older` option?

---

<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, 5:04am UTC](https://discuss.elastic.co/t/not-able-to-feed-log-file-to-elasticsearch-through-logstash/46062/3 "2017-07-06T05:04:15Z")

</div>


