Yes but I am getting this as an output now.
Along with an error message - "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse field [owner] of type [text] in document with id '10077'. Preview of field's value: '{name=Shashi Raghunandan, id=E040547}'", "caused_by"=>{"type"=>"illegal_state_exception", "reason"=>"Can't get text on a START_OBJECT at 1:89"}}}}}
{
"shortDesc" => "Enables interoperable digital IDs",
"alias" => [
[0] {
"name" => "a1Name",
"id" => "a1Id"
},
[1] {
"name" => "a2Name",
"id" => "a2Id"
}
],
"regAvail" => [
[0] "ap",
[1] "lac",
[2] "mea"
],
"family" => "Strategic Growth",
"salesCenterUrl" => "n/a",
"isActive" => true,
"prdctId" => "10077",
"line" => "Strategic Growth",
"name" => "ComPass",
"owner" => {
"name" => "Shashi Raghunandan",
"id" => "E040547"
},
"longDesc" => "A platform that enables interoperable digital ID's and other capabilities ",
"cntryAvail" => [
[0] "n/a"
],
"status" => "In Development",
"id" => "10077"
}
but my requirement is to have inline output.
{
"shortDesc" => "Enables interoperable digital IDs",
"alias" => [
{
"name" => "a1Name",
"id" => "a1Id"
},
{
"name" => "a2Name",
"id" => "a2Id"
}
],
"regAvail" => [
"ap",
"lac",
"mea"
],
"family" => "Strategic Growth",
"salesCenterUrl" => "n/a",
"isActive" => true,
"prdctId" => "10077",
"line" => "Strategic Growth",
"name" => "ComPass",
"owner" => {
"name" => "Shashi Raghunandan",
"id" => "E040547"
},
"longDesc" => "A platform that enables interoperable digital ID's and other capabilities ",
"cntryAvail" => [
"n/a"
],
"status" => "In Development",
"id" => "10077"
}
Also, for your reference, please have a look at the filter placed on input message.
filter {
mutate {
split => ["message", "#"]
add_field => { "firstrandomdata" => "%{[message][0]}" }
add_field => { "msg" => "%{[message][1]}" }
add_field => { "secondrandomdata" => "%{[message][2]}" }
}
mutate {
rename => ["msg", "message" ]
}
mutate {
gsub => [
"message", "\n", "\n",
"message", "\t", "\t",
"message", "\r", "\r"
]
}
json {
source => "message"
}
mutate {
remove_field => ["@version", "@timestamp", "firstrandomdata", "secondrandomdata", "message"]
}
}