Last active
January 25, 2019 23:33
-
-
Save iamitshri/fca9cd04bfd44faa2b87be5117196e55 to your computer and use it in GitHub Desktop.
Logstash get incremental updates based on last run value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
jdbc { | |
jdbc_driver_library => "/Users/Path/dev-apps/logstash-6.5.4/mysql-java-connector/mysql-connector-java-5.1.46.jar" | |
jdbc_driver_class => "com.mysql.jdbc.Driver" | |
jdbc_connection_string => "jdbc:mysql://localhost:3306/elastic-search-test" | |
schedule => "* * * * *" | |
jdbc_user => "root" | |
jdbc_password => "mysqlN01" | |
statement => "SELECT * from person where id > :sql_last_value" | |
jdbc_paging_enabled => "true" | |
jdbc_page_size => "50000" | |
last_run_metadata_path => ".logstash_jdbc_last_run" | |
clean_run => true | |
use_column_value => true | |
tracking_column => "id" | |
tracking_column_type => "numeric" | |
} | |
} | |
output { | |
stdout { | |
codec => rubydebug | |
} | |
file{ | |
path => "event-output-redirect.txt" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment