Guest User

Untitled

a guest
Nov 10th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. jdbc {
  2. # Postgres jdbc connection string to our database, mydb
  3. jdbc_connection_string => "jdbc:postgresql://masked"
  4. jdbc_user => ""
  5. jdbc_password => ""
  6. # The path to our downloaded jdbc driver
  7. jdbc_driver_library => "/home/apps/logstash2/logstash-5.5.1/config/postgresql-42.1.4.jar"
  8. # The name of the driver class for Postgresql
  9. jdbc_driver_class => "org.postgresql.Driver"
  10. # our query
  11. statement => "SELECT * from api_log where in_timestamp > :sql_last_value"
  12. use_column_value => true
  13. tracking_column => "id"
  14. tracking_column_type => "number"
  15. schedule => "* * * * *"
  16. jdbc_paging_enabled => true
  17. jdbc_page_size => "100000"
  18. type => "app1"
  19. last_run_metadata_path => "/home/apps/logstash2/logstash-5.5.1/temp/.mlastrun"
  20. }
  21.  
  22. jdbc {
  23. # Postgres jdbc connection string to our database, mydb
  24. jdbc_connection_string => "jdbc:postgresql://masked"
  25. jdbc_user => "user"
  26. jdbc_password => "userpassword"
  27. # The path to our downloaded jdbc driver
  28. jdbc_driver_library => "/home/apps/logstash2/logstash-5.5.1/config/postgresql-42.1.4.jar"
  29. # The name of the driver class for Postgresql
  30. jdbc_driver_class => "org.postgresql.Driver"
  31. # our query
  32. statement => "SELECT * from logtable where id > :sql_last_value"
  33. use_column_value => true
  34. tracking_column => "id"
  35. tracking_column_type => "number"
  36. schedule => "* * * * *"
  37. jdbc_paging_enabled => true
  38. jdbc_page_size => "100000"
  39. type => "app2"
  40. last_run_metadata_path => "/home/apps/logstash2/logstash-5.5.1/temp/.mherelastrun"
  41. }
  42.  
  43. output {
  44. elasticsearch {
  45. hosts => ["localhost:9200"]
  46. # manage_template => true
  47. index => "%{type}-%{+YYYY.MM.dd}"
  48. document_type => log
  49. }
  50. }
Add Comment
Please, Sign In to add comment