This is my conf file, i want to transfer my data from mysql to postgres or you can consider is as multiple DB instance
input {
jdbc {
jdbc_driver_library => "C:/Users/pc/Desktop/mysql-conf/mysql-connector-j-8.2.0.jar"
jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/write_db"
jdbc_user => "root"
jdbc_password => "root"
statement => "SELECT * FROM write_db.customer_detail WHERE verificationStatus = 'VERIFIED'"
schedule => "*/1 * * * *"
}
}
filter {
# Add your filter conditions here
}
output {
jdbc {
jdbc_driver_library => "C:/Users/pc/Desktop/postgresql-conf/postgresql-42.5.4.jar"
jdbc_driver_class => "org.postgresql.Driver"
jdbc_connection_string => "jdbc:postgresql://localhost:5432/read_db"
jdbc_user => "postgres"
jdbc_password => "root"
statement => "INSERT INTO read_db.customer_detail(address, firstname, gender, lastname, phonenumber, verificationstatus) VALUES (?, ?, ?, ?, ?, ?)"
}
}
I don't know why I keep getting this issue, Is there anything to do with the conf file ?
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_user' for jdbc
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_user' for jdbc
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_password' for jdbc
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_password' for jdbc
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_driver_library' for jdbc
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_driver_library' for jdbc
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_connection_string' for jdbc
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_connection_string' for jdbc
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_driver_class' for jdbc
""2023-11-06 14:42:19 [ERROR] [jdbc]: Unknown setting 'jdbc_driver_class' for jdbc
""2023-11-06 14:42:19 [ERROR] [agent]: Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ConfigurationError) Something is wrong with your configuration.", :backtrace=>["org.logstash.config.ir.CompiledPipeline.<init>(CompiledPipeline.java:120)", "org.logstash.execution.AbstractPipelineExt.initialize(AbstractPipelineExt.java:186)", "org.logstash.execution.AbstractPipelineExt$INVOKER$i$initialize.call(AbstractPipelineExt$INVOKER$i$initialize.gen)", "org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:847)", "org.jruby.ir.runtime.IRRuntimeHelpers.instanceSuper(IRRuntimeHelpers.java:1318)", "org.jruby.ir.instructions.InstanceSuperInstr.interpret(InstanceSuperInstr.java:139)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:367)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:128)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:115)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:452)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:92)", "org.jruby.RubyClass.newInstance(RubyClass.java:931)", "org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:452)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:92)", "org.jruby.ir.instructions.CallBase.interpret(CallBase.java:561)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:367)",
"org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)", "org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:88)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:238)", "org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:225)", "org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:228)", "org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:516)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:293)", "org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:328)", "org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:66)", "org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:116)", "org.jruby.runtime.MixedModeIRBlockBody.commonYieldPath(MixedModeIRBlockBody.java:136)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:66)", "org.jruby.runtime.IRBlockBody.call(IRBlockBody.java:58)", "org.jruby.runtime.Block.call(Block.java:143)", "org.jruby.RubyProc.call(RubyProc.java:352)", "org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:110)", "java.base/java.lang.Thread.run(Thread.java:1623)"]}
I feel like Plugin Configuration is wrong for the output but not sure. Can someone help ?
I checked the official documentation but could not find any output plugin named jdbc. Maybe you should use another output plugin?
Here is the documentation: https://www.elastic.co/guide/en/logstash/current/output-plugins.html