Created
August 29, 2017 06:51
-
-
Save imamdigmi/86fefc019ce49c5dd49b388641d4df68 to your computer and use it in GitHub Desktop.
logstash
This file contains hidden or 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 => "/home/idiot/Backup/EL/mysql-connector-java-5.1.43/mysql-connector-java-5.1.43-bin.jar" | |
| jdbc_driver_class => "com.mysql.jdbc.Driver" | |
| jdbc_connection_string => "jdbc:mysql://localhost:3306/ijak" | |
| jdbc_user => "root" | |
| jdbc_password => "idiot" | |
| schedule => "* * * * *" | |
| statement => "SELECT * FROM books WHERE created > :sql_last_value ORDER BY created" | |
| use_column_value => true | |
| tracking_column => created | |
| } | |
| tcp { | |
| port => 5000 | |
| } | |
| } | |
| output { | |
| stdout { codec => json_lines } | |
| elasticsearch { | |
| hosts => "localhost:9200" | |
| index => "books" | |
| document_type => "data" | |
| document_id => "%{books_id}" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment