Logstash deleting records from Db Table after running logstash.conf file

HI all,
I am using ORACLE Db in my case.

I have created a sample table with user_id and names as the only 2 columns in them.

I inserted some 2 records with these values([(1,"sam"),(2,"smith") and so on ]).
I try to execute the logstash.conf file with this structure

input {
    jdbc {
        jdbc_connection_string => "jdbc:oracle:thin:@host:port/XE"
        jdbc_user => "username"
	jdbc_password => "password"
        jdbc_driver_library => "/home/tomadm/JatinSandbox/KibanaDbTry/ojdbc7.jar"
        jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
	#jdbc_validate_connection => true
        statement => "select * from metable"
    }

}
output {
    stdout { codec => json_lines }
	elasticsearch {
	index => "batchre"
	hosts => "http://my_ip:port"
	document_type => "Batchdoc"
	}
}

Now after I run this conf file. I see the table in database is rendered empty.
Can anyone suggest what could be the error?

try this, hope this helps, change the details to OracleDB connection details,

Logstash is not emptying your database table. You should look elsewhere.

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