Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- parent : {
- "id" : 1,
- "name" : "test",
- "children" : [
- { "idchild" : 1, "name" : "c1"},
- {...}
- ]
- }
- input {
- jdbc {
- jdbc_connection_string => "jdbc:postgresql://localhost:5432/test"
- ...
- }
- }
- filter { ruby { code => "event.set('children',[]);" } }
- output {
- elasticsearch {
- index => "test"
- user => "elastic"
- password => "elastic"
- document_type => "parent"
- document_id => "%{id}"
- hosts => "localhost:9200"
- }
- }
- filter {
- mutate {
- add_field => {
- "[children][child][idchild]" => "%{id}"
- "[children][child][name]" => "%{name}"
- }
- }
- }
Add Comment
Please, Sign In to add comment