I am getting via http poller one json
{
"id":12345
"name":"",
"lastname":"",
"age":12,
"address":{"city":"XXXX" , "street":"ZZZZ" }
}
and I would like this to generate two document in my output :
person :
{
"id":12345
"name":"",
"lastname":"",
"age":12
}
address :
{
"city":"XXXX" ,
"street":"ZZZZ"
}
meaning I got one event in the input
in the input phase getting one input :
input {
http_poller {
urls => {
test1 => "http://localhost:8080"
}
}
in the filter phase I would like to :
- create person event (tag it as P)
- create address event (tag it as A)
in the output phase I would like to :
- send P to P type in ES
- send A to A type in ES