I am trying to use Logstash's Key Value (kv) filter to parse logs. It specifically fails for a pair where key is "valid". see below example:
Log message: "versionInfo=VersionInfo{valid=test}"
Logstash filter config snippet for Key value pair:
filter {
kv {
source => "message"
field_split => "\{,\}"
trim => "\{\}\[\]"
}
}
Error:
"_type"=>"log", "_id"=>"AVcOLhG06gVwm51zjV4A", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [valid]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid format: "test""}}}}, :level=>:warn}
But the same filter parses the message successfully if i remove the "valid" text and replace it with some other text like:
"versionInfo=VersionInfo{field=test}"
What is special for the "valid" text because of which parsing fails?