Hi, I am trying to use kv filter to parse the below logs
Name: abc\r\nAge: 39\r\nGender: Male\r\nSalary: 87
My kv filter is as below kv { source => "log" field_split_pattern => "\\\r\\\n" value_split => ":" }
I have tried with different field_split_pattern as \r\n, \\r\\n & \\\r\\\n but nothing seems to split the key value pairs.
Hi,
In your filter you could replace all those \\r\\n with spaces usin the gsub processor
gsub => ["log","\\\r\\\n"," "] kv { source => "log" value_split => ":" }
Thank you @grumo35. That worked perfectly.
© 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.