I am using Logstash 5.4.0. Trying to pull all the new records that are in my Db after my last run. Below is my configuration. However, I am finding the content of the file mentioned in last_run_metadata_path always revert back to "--- 2017-01-01 00:00:00.000000000 Z" after each run. It looks like it is not storing the time when schedular has run last time. Just to add, my tracking_column's type is timestamp and i have mentioned the same in configuration sql statement also (but for now i have masked it).
Because of this, i m getting duplicates from output. Help me please.
type => "Database"
sql_log_level => "debug"
jdbc_driver_library => "/home/siva/Oracle/engine/logstash-5.4.0/vendor/ojdbc7.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521/XE"
jdbc_user => "XXXX"
jdbc_password => "XXXX"
statement => "*****"
use_column_value => true
tracking_column => "insert_time"
tracking_column_type => "timestamp"
schedule => "* * * * *"
record_last_run => true
last_run_metadata_path => "/home/siva/Oracle/engine/logstash-5.4.0/bin/logstash_jdbc_last_run"
codec => json