Hi. For test I have easy configuration
input { file { path => "e:/work/__testing/testELK/logs/*.log" exclude => "test2.log" codec => "json" start_position => "beginning" } } output { file { path => "E:/work/__testing/testELK/out.log" } }
and 3 files in folder .../logs/test1.log, test2.log, test3.log But "exclude" not work. When I add line in all files, I see all in out.log:
{"message":"INCOMMING : null","@timestamp":"2018-11-19T10:15:42.984Z","path":"e:/work/__testing/testELK/logs/test1.log","host":"domPC","level":"INFO","mdc":{"UUID":"3e5876f8-964e-4e44-94d6-42528ba68110"},"@version":"1","source_host":"VitaliyPK","method":"doFilter"}
{"message":"INCOMMING : null","@timestamp":"2018-11-19T10:15:42.984Z","path":"e:/work/__testing/testELK/logs/test2.log","host":"domPC","level":"INFO","mdc":{"UUID":"3e5876f8-964e-4e44-94d6-42528ba68110"},"@version":"1","source_host":"VitaliyPK","method":"doFilter"}
{"message":"INCOMMING : null","@timestamp":"2018-11-19T10:15:42.984Z","path":"e:/work/__testing/testELK/logs/test3.log","host":"domPC","level":"INFO","mdc":{"UUID":"3e5876f8-964e-4e44-94d6-42528ba68110"},"@version":"1","source_host":"VitaliyPK","method":"doFilter"}
I try this config on logstash-6.2.3 an all work correct. In out.log i have only data from test1.log and test3.log. Can you help me, I do something wrong ?