Hi,
I read lots of posts on the similar topics, but I still have problems to figure it out. So I have to post this one and hopefully get help from here. Thanks a lot in advance.
Jason file:
{
"lable1":
{
d1: 0,
d2: 0,
d3: 0,
d4: 0
},
"lable2":
{
d2: 0,
d4: 0
},
"lable3":
{
d1: 0,
d3: 0
}
}
Expect Output in Kibana:
3 separate Documents:
For example:
dname: label1
d1: 0
d2: 0
d3: 0
d4: 0
My current logstash.conf:
input {
tcp {
port => 9400
}
file {
type => "json"
path => "./temp/*.json"
codec => multiline {
pattern => "^\{|\}"
negate => true
what => "previous"
auto_flush_interval => 1
#multiline_tag => ""
}
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
#mutate { gsub => [ "message", "\A", "{", "message", "\Z", "}" ] }
json { source => "message"}
}