Indeed, the codec will just consume the first JSON object. You could try
# Remove newlines, because mutate+split will not match them
mutate { gsub => [ "message", "\n", "" ] }
# This removes the "}{"
mutate { split => { "message" => "}{" } }
split { field => "message" }
# Add { at the start of the string and } at the end if not present
if [message] =~ /^[^{]/ { mutate { gsub => [ "message", "^", "{" ] } }
if [message] =~ /[^}]$/ { mutate { gsub => [ "message", "$", "}" ] } }
json { source => "message" }
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.