jdbc - How do I keep Logstash running so it syncs data from my RDBMS to ES? -


i'm complete newbie elk stack, please excuse ignorance. i've been able logstash send data database elasticsearch, exits once it's done transfer. how keep running keeps them in sync? thanks

you need specify schedule in jdbc input:

the schedule below (* * * * *) run every minute , select records database , select records have been updated after last time query ran. updated timestamp field might named differently, feel free adjust fit case.

input {   jdbc {     jdbc_driver_library => "mysql-connector-java-5.1.36-bin.jar"     jdbc_driver_class => "com.mysql.jdbc.driver"     jdbc_connection_string => "jdbc:mysql://localhost:3306/mydb"     jdbc_user => "mysql"     parameters => { "some_field" => "value" }     schedule => "* * * * *"     statement => "select * songs some_field = :some_field , updated > :sql_last_value"   } } 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -