Guest User

Untitled

a guest
Feb 12th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. parent : {
  2. "id" : 1,
  3. "name" : "test",
  4. "children" : [
  5. { "idchild" : 1, "name" : "c1"},
  6. {...}
  7. ]
  8. }
  9.  
  10. input {
  11. jdbc {
  12. jdbc_connection_string => "jdbc:postgresql://localhost:5432/test"
  13. ...
  14. }
  15. }
  16.  
  17. filter { ruby { code => "event.set('children',[]);" } }
  18.  
  19. output {
  20. elasticsearch {
  21. index => "test"
  22. user => "elastic"
  23. password => "elastic"
  24. document_type => "parent"
  25. document_id => "%{id}"
  26. hosts => "localhost:9200"
  27. }
  28. }
  29.  
  30. filter {
  31. mutate {
  32. add_field => {
  33. "[children][child][idchild]" => "%{id}"
  34. "[children][child][name]" => "%{name}"
  35. }
  36. }
  37. }
Add Comment
Please, Sign In to add comment