Config JDBC input to only get new logs from MySQL

(Thang Le) #1

Hello everyone,
I'm trying to use logstash to get logs from MySQL server.
It keeps getting every logs every minute. This is my config for jdbc:

jdbc {
        clean_run => true
        jdbc_connection_string => "jdbc:mysql://localhost:3306/mysql?user=root"
        jdbc_driver_class => "com.mysql.jdbc.Driver"
        jdbc_driver_library => "/etc/logstash/mysql-connector-java-5.1.36.jar"
        jdbc_user => "root"
        schedule => "* * * * *"
        statement => "SELECT * from logs where product = 'vnac'"

How can I config JDBC to get the new logs only?

(system) closed #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.