I will sync data from sql to elastic. My config was running a few tries but now It is deleting my docs. Sync is successful and I dont see any error.
My config
input {
jdbc {
jdbc_driver_library => "C:\Program Files\sqljdbc_10.2\enu\mssql-jdbc-10.2.1.jre17.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://localhost:4433;database=mssql;iencrypt=true;trustServerCertificate=true;"
jdbc_user => "sa"
jdbc_password => "123_sa"
jdbc_paging_enabled => true
clean_run => true
type => "call"
plugin_timezone => "local"
tracking_column => "last_modified_date"
use_column_value => true
tracking_column_type => "timestamp"
schedule => "*/15 * * * *"
statement => "SELECT TOP (10) * from call where last_modified_date > :sql_last_value ORDER BY last_modified_date ASC"
last_run_metadata_path => "C:\Elk_Stack\logstash-8.3.3\last_modified_process"
}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "call"
user => "elastic"
password => "xxxxxx"
document_id => "%{[@metadata][_id]}"
}
}