Hello All,
I am facing a issue to split the filepath with backslash,
Below is my code for split filepath with \
Logstash Code
input {
file { path => "C:\logstash-2.3.1\CSV\SQL.csv" type=>"sql" }
}
filter { mutate { split => [ "path", '\' ] }
Thanks for your help in advance,
I can't explain why, but impossible to say split filter to use \ as separator... You can open an issue on github : https://github.com/logstash-plugins/logstash-filter-split/issues
\
Anyway, here's a tricky configuration to make it work :
mutate { gsub => ["path", "[\\]", "/"] } mutate { split => { "path" => "/" } }
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.