Hi Team,
I am still having a difficulty parse json multiline and not getting any clue about it. Can someone please help with it?
Here are the original message
[
{
"post_title": "Windemuller",
"group_name": "lorenz",
"discovered": "2020-01-12 00:00:00.000000"
},
{
"post_title": "Leaks Company Birch Communications inc.",
"group_name": "ragnarlocker",
"discovered": "2020-06-10 00:00:00.000000"
},
{
"post_title": "Brunner Announce – Hello World !",
"group_name": "ragnarlocker",
"discovered": "2020-06-11 00:00:00.000000"
},
{
"post_title": "INC RANSOMWARE...",
"group_name": "donutleaks",
"discovered": "2023-09-30 04:27:49.408003"
}
]
And here is my codec
input {
# file {
# path => ["/var/log/ran.json"]
# tags => "ransomware"
# start_position => "beginning"
stdin {
codec => json { target => "[document]" }
# codec => multiline {
# pattern => "^{"
# what => "previous"
# }
}
}
#filter {
# if [message] =~ /^{.*}$/ {
# json {
# source => "message"
# target => "parsed_json"
## remove_field => ["message"]
# }
# }
#}
output {
stdout { codec => rubydebug }
}