I have problem with assigning properly last 'sql_last_value'. I wanted to assign it with my last timestamp which is stored in database.
Here is my config:
input {
jdbc {
jdbc_driver_library => "/usr/share/logstash/libs/sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "
jdbc_user => ""
jdbc_password => "**"
statement => "select * from log where timestamp > :sql_last_value"
tracking_column => "timestamp"
tracking_column_type => "timestamp"
clean_run => true
schedule => "/10 * * * * *"
}
}
output {
elasticsearch {
hosts => "elasticsearch:9200"
}
stdout { codec => rubydebug }
}
It retrieve data but with the second query it not uses my timestamp. It uses something like Datetime now ?
What iam doing wrong ? Or I just don't understand somethinh?