Advertisement
Guest User

Untitled

a guest
Nov 11th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. cid id color new hex create modified
  2. 1 101 100 euro abcd #86c67c 5/5/2016 15:48 5/13/2016 14:15
  3. 1 102 100 euro 1234 #fdf8ff 5/5/2016 15:48 5/13/2016 14:15
  4.  
  5. {
  6. "_index": "colors_hexa",
  7. "_type": "colors",
  8. "_id": "1",
  9. "_version": 218,
  10. "found": true,
  11. "_source": {
  12. "cid": 1,
  13. "color": "100 euro",
  14. "new" : {
  15. "101": "abcd",
  16. "102": "1234",
  17. }
  18. "hex" : {
  19. "101": "#86c67c",
  20. "102": "#fdf8ff",
  21. }
  22. "created": "2016-05-05T10:18:51.000Z",
  23. "modified": "2016-05-13T08:45:30.000Z",
  24. "@version": "1",
  25. "@timestamp": "2016-05-14T01:30:00.059Z"
  26. }
  27. }
  28.  
  29. input {
  30. jdbc {
  31. jdbc_driver_library => "/etc/logstash/mysql/mysql-connector-java-5.1.39-bin.jar"
  32. jdbc_driver_class => "com.mysql.jdbc.Driver"
  33. jdbc_connection_string => "jdbc:mysql://127.0.0.1:3306/test"
  34. jdbc_user => "root"
  35. jdbc_password => "*****"
  36. schedule => "* * * * *"
  37.  
  38. statement => "select cid,id,color, new ,hexa_value ,created,modified from colors_hex_test order by cid"
  39. jdbc_paging_enabled => "true"
  40. jdbc_page_size => "50000"
  41. }
  42. }
  43.  
  44. output {
  45. elasticsearch {
  46. index => "colors_hexa"
  47. document_type => "colors"
  48. document_id => "%{cid}"
  49. hosts => "localhost:9200"
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement