Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- jdbc {
- jdbc_connection_string => "jdbc:mysql://localhost:3306/sample"
- jdbc_user => "root"
- jdbc_password => "adminmysql"
- # The path to our downloaded jdbc driver
- jdbc_driver_library => "/Users/robertofernandez/libs/mysql-connector-java-5.1.25.jar"
- jdbc_driver_class => "com.mysql.jdbc.Driver"
- # our query
- schedule => "*/2 * * * *"
- #statement => "SELECT * FROM muser"
- statement => "SELECT * FROM muser where created_date > :sql_last_value order by created_date"
- use_column_value => true
- tracking_column => created_date
- }
- }
- output {
- stdout { codec => json_lines }
- elasticsearch {
- "hosts" => "localhost:9200"
- "index" => "muser"
- "document_type" => "data"
- "document_id" => "%{id}"
- }
- }
Add Comment
Please, Sign In to add comment