# Input simple txt file

**URL:** <https://discuss.elastic.co/t/input-simple-txt-file/202892>\
**Category:** Logstash\
**Created:** [October 9, 2019, 6:00pm UTC](https://discuss.elastic.co/t/input-simple-txt-file/202892 "2019-10-09T18:00:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![happycampo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/happycampo/32/55494_2.png) [@happycampo](https://discuss.elastic.co/u/happycampo)\
**Post date:** [October 9, 2019, 6:00pm UTC](https://discuss.elastic.co/t/input-simple-txt-file/202892/1 "2019-10-09T18:00:11Z")

</div>

Hello,

Not sure what I'm missing:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/8/58007d24714c0ab10ddc6f88bf3f7afef3963fb1.png)

I have setup a docker elk stack and now I'm trying to see if I can ingest a log file locally. I was having trouble with logstash shutting down when introducing a new input. See this thread:  
[https://discuss.elastic.co/t/pipeline-terminated-pipeline-id-monitoring-logstash-logstash-shutdown/202709](https://discuss.elastic.co/t/pipeline-terminated-pipeline-id-monitoring-logstash-logstash-shutdown/202709)

Now I just want to play with some files and test how they will look.

Here is my logstash.conf

```
input {

       file {
        path => "/opt/docker-elk/input.txt"
        start_position => "beginning"
        sincedb_path => "/dev/null"
      }
}

## Add your filters / logstash plugins configuration here

output {
     elasticsearch {
             hosts => "elasticsearch:9200"
             user => "elastic"
             password => "changeme"
     }

     stdout {
        codec => rubydebug
        }

}

```

What am I missing? I don't see any activity logged when I add lines to the input.txt

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 9, 2019, 6:10pm UTC](https://discuss.elastic.co/t/input-simple-txt-file/202892/2 "2019-10-09T18:10:43Z")

</div>

Enable TRACE level logging and see what filewatch has to say.

---

<div class="post-metadata">

**Author:** ![happycampo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/happycampo/32/55494_2.png) [@happycampo](https://discuss.elastic.co/u/happycampo)\
**Post date:** [October 9, 2019, 6:12pm UTC](https://discuss.elastic.co/t/input-simple-txt-file/202892/3 "2019-10-09T18:12:06Z")

</div>

How do I do that?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 9, 2019, 7:22pm UTC](https://discuss.elastic.co/t/input-simple-txt-file/202892/4 "2019-10-09T19:22:11Z")

</div>

Add '--log.level trace' to the command line, or set log.level in logstash.yml, or you may even be able to work it with

```
curl -XPUT 'localhost:9600/_node/logging?pretty' -H 'Content-Type: application/json' -d'
{
    "logger.filewatch.discoverer" : "TRACE",
    "logger.filewatch.observingtail" : "TRACE",
    "logger.filewatch.sincedbcollection" : "TRACE",
    "logger.filewatch.tailmode.handlers.createinitial" : "TRACE",
    "logger.filewatch.tailmode.handlers.grow" : "TRACE",
    "logger.filewatch.tailmode.processor" : "TRACE"
}
'

```

If you are going to use that I would start logstash with a file input that reads a non-existent file, then enable tracing, then add a line to the file.

---

<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:** [November 6, 2019, 7:22pm UTC](https://discuss.elastic.co/t/input-simple-txt-file/202892/5 "2019-11-06T19:22:14Z")

</div>

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