Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jdbc {
- # Postgres jdbc connection string to our database, mydb
- jdbc_connection_string => "jdbc:postgresql://masked"
- jdbc_user => ""
- jdbc_password => ""
- # The path to our downloaded jdbc driver
- jdbc_driver_library => "/home/apps/logstash2/logstash-5.5.1/config/postgresql-42.1.4.jar"
- # The name of the driver class for Postgresql
- jdbc_driver_class => "org.postgresql.Driver"
- # our query
- statement => "SELECT * from api_log where in_timestamp > :sql_last_value"
- use_column_value => true
- tracking_column => "id"
- tracking_column_type => "number"
- schedule => "* * * * *"
- jdbc_paging_enabled => true
- jdbc_page_size => "100000"
- type => "app1"
- last_run_metadata_path => "/home/apps/logstash2/logstash-5.5.1/temp/.mlastrun"
- }
- jdbc {
- # Postgres jdbc connection string to our database, mydb
- jdbc_connection_string => "jdbc:postgresql://masked"
- jdbc_user => "user"
- jdbc_password => "userpassword"
- # The path to our downloaded jdbc driver
- jdbc_driver_library => "/home/apps/logstash2/logstash-5.5.1/config/postgresql-42.1.4.jar"
- # The name of the driver class for Postgresql
- jdbc_driver_class => "org.postgresql.Driver"
- # our query
- statement => "SELECT * from logtable where id > :sql_last_value"
- use_column_value => true
- tracking_column => "id"
- tracking_column_type => "number"
- schedule => "* * * * *"
- jdbc_paging_enabled => true
- jdbc_page_size => "100000"
- type => "app2"
- last_run_metadata_path => "/home/apps/logstash2/logstash-5.5.1/temp/.mherelastrun"
- }
- output {
- elasticsearch {
- hosts => ["localhost:9200"]
- # manage_template => true
- index => "%{type}-%{+YYYY.MM.dd}"
- document_type => log
- }
- }
Add Comment
Please, Sign In to add comment