Seperate multiple events in input into seperate documents in elasticsearch index

INPUT in logstash :
{
"Teacher": {
"Name": "Mary",
"age": 20,

},
"Student": [
{
"Name": "Tim",
"age"12

},
{
"Name": "Eric",
"age":13

}
]
}

Need to filter this input using logstash to send three seperate documents into ElasticSearch.

doc1: {
"Name": "ABC",
"age": 20,

}
doc2: {
"Name": "Tim",
"age"12

}
doc 3:
{
"Name": "Eric",
"age":13

}
Tried split, mutate, ruby filters function but did not get the desired result. Could someone help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.