# Reading a file with file input

**URL:** <https://discuss.elastic.co/t/reading-a-file-with-file-input/195604>\
**Category:** Logstash\
**Created:** [August 17, 2019, 3:54pm UTC](https://discuss.elastic.co/t/reading-a-file-with-file-input/195604 "2019-08-17T15:54:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lavinia\_Maties](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavinia_maties/32/52486_2.png) [@Lavinia\_Maties](https://discuss.elastic.co/u/Lavinia_Maties)\
**Post date:** [August 17, 2019, 3:54pm UTC](https://discuss.elastic.co/t/reading-a-file-with-file-input/195604/1 "2019-08-17T15:54:11Z")

</div>

Hi everyone, I have a problem parsing my file using Logstash on windows 10.  
this is my .conf file :  
input {  
file {  
path =\> "C:\ProgramData\ELK\Logs\CBS\CBS.log"  
}  
}

filter {  
grok {  
match =\> { "message" =\> "%{DATESTAMP:time}, %{WORD:inform} %{SPACE} %{GREEDYDATA:rest}" }  
}  
date {  
match =\> ["timestamp" , "dd/MMM/yyyy:HH:mm:ss Z"]  
}  
}

output {  
elasticsearch { hosts =\> ["localhost:9200"] }  
stdout { codec =\> rubydebug }  
}  
I'am using Logstash 7.0.0. I try to change to 6.2.4 version but I can't apparently is seems to not recognize java VM .. so any help is good. Thank you 🙂

---

<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:** [August 17, 2019, 4:25pm UTC](https://discuss.elastic.co/t/reading-a-file-with-file-input/195604/2 "2019-08-17T16:25:05Z")

</div>

Use forward slash in the path option for the file input.

What problem are you having?

---

<div class="post-metadata">

**Author:** ![Lavinia\_Maties](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavinia_maties/32/52486_2.png) [@Lavinia\_Maties](https://discuss.elastic.co/u/Lavinia_Maties)\
**Post date:** [August 17, 2019, 4:29pm UTC](https://discuss.elastic.co/t/reading-a-file-with-file-input/195604/3 "2019-08-17T16:29:45Z")

</div>

Hi,  
The problem is that I can see any index in Elasticsearch.. it seems that my file is not read at all. I tried with forward slash but is steel not working  
Logstash is Successfully started but then nothing happens

---

<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:** [August 17, 2019, 4:40pm UTC](https://discuss.elastic.co/t/reading-a-file-with-file-input/195604/4 "2019-08-17T16:40:32Z")

</div>

Try

```
file {
    path => "C:/ProgramData/ELK/Logs/CBS/CBS.log"
    start_position => "beginning"
    sincedb_path => "NUL"
}
```

---

<div class="post-metadata">

**Author:** ![Lavinia\_Maties](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavinia_maties/32/52486_2.png) [@Lavinia\_Maties](https://discuss.elastic.co/u/Lavinia_Maties)\
**Post date:** [August 17, 2019, 4:53pm UTC](https://discuss.elastic.co/t/reading-a-file-with-file-input/195604/5 "2019-08-17T16:53:37Z")

</div>

I tried, but is not working.  
Thanks anyway

---

<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:** [August 17, 2019, 5:48pm UTC](https://discuss.elastic.co/t/reading-a-file-with-file-input/195604/6 "2019-08-17T17:48:01Z")

</div>

Set the log.level to trace and see what filewatch says.

---

<div class="post-metadata">

**Author:** ![Lavinia\_Maties](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavinia_maties/32/52486_2.png) [@Lavinia\_Maties](https://discuss.elastic.co/u/Lavinia_Maties)\
**Post date:** [August 17, 2019, 7:50pm UTC](https://discuss.elastic.co/t/reading-a-file-with-file-input/195604/7 "2019-08-17T19:50:23Z")

</div>

Yea, actually that was a problem with log path, I didn't define the log extension correctly. But it's ok now.  
Thank you for your support 🙂

---

<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 14, 2019, 7:50pm UTC](https://discuss.elastic.co/t/reading-a-file-with-file-input/195604/8 "2019-09-14T19:50:29Z")

</div>

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