I am receiving a JSON object via HTTP Poller and I need to split it up and write into the multiple documents in Elasticsearch.
For example, what I get from HTTP poller is something like this
{
bank:[
{
id: 100,
balance: 20
},
{
id: 101,
balance: 200
},
{
id: 102,
balance: 2000
]
}
and I need to output three documents into Elasticsearch. For example
index=bank
document=account
document_id = 100
{id:100,balance=20}
index=bank
document=account
document_id = 101
{id:101,balance=200}
index=bank
document=account
document_id = 102
{id:102,balance=2000}
I am a novice as far as Logstash and Elasticsearch are concerned, so do appreciate help in the form of pointers/references/examples.
thanks