JDBC last run is updated, but logstash always start from the beggining and duplicate documents

Hi, I have a pipeline with JDBC input with schedule of 5 min, I ran logstash as a service

sudo systemctl start logstash

and the JDBC last run is updated, but when logstash start the last run is not used an duplicate documents.

the permissions for the folder and the file are


also tried with


but still is duplicating the documents. this is the input of my pipeline

jdbc {
                jdbc_driver_class => "org.postgresql.Driver"
                jdbc_connection_string => "jdbc:postgresql:..."
                jdbc_user => "..."
                jdbc_password => "..."
                jdbc_validate_connection => true
                statement => "...
                                order by history.clock asc"
                schedule => "*/5 * * * *"
                use_column_value => true
                record_last_run => true
                tracking_column => "clock"
                last_run_metadata_path => "/etc/logstash/conf.d/db/nselec-ups-lastrun-history.yml"
                type => "history"

what is wrong with my configuration file?

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