Cannot listen file in logstash with absolute path in windows


(Dj Vidov) #1

I have logstash installed on path: D:\WORK\ElasticSearch\logstash-2.0.0\bin and my apps write logs on path: D:\Logs

When I use logstash path to read files from "D:\WORK\ElasticSearch\logstash-2.0.0\bin" with this script i'm able to read it.
input { file { path => ["\PlatformTest_*"] discover_interval => 20 start_position => "beginning" stat_interval => 2 } }

But when I use the real path of logs with this log, it don't work:
input { file { path => ["D:\Logs\PlatformTest_*"] discover_interval => 20 start_position => "beginning" stat_interval => 2 } }

Any idea why absolute path doesn't work?

Thank you!

P.S. In output I create a file with this code:
file { path => "D:\logs\output.txt" }
and absolute path works.


(Magnus B├Ąck) #2

Try using forward slashes instead of backslashes.


(Dj Vidov) #3

you're right! thank you!
but is strange why in output it works with backslash.


(system) #4