Sequel_opts to pass securityMechanism as a parmeter to jdbc

how can we pass the property securityMechanism using the sequel_opts in logstash configuration. I tried sequel_opts => {"securityMechanism" => "7"} but no use.

Equivalent to

pOpts.put("securityMechanism", sMech);
Connection pCxn = DriverManager.getConnection(sURL, pOpts);

Hello,

I do not see this options listed under https://github.com/jeremyevans/sequel/blob/master/doc/opening_databases.rdoc

Which database vendor are you using ?
Did you try to set it directly in the JDBC url, maybe it is the correct way to do it as in this example http://docs.oracle.com/javadb/10.8.3.0/ref/rrefattribsecmech.html

I tried setting it up in the URL but it says
Java::ComIbmDb2JccAm::SqlSyntaxErrorException: [jcc][10165][10036][4.15.120] Invalid database URL syntax ERRORCODE=-4461, SQLSTATE=42815

I am trying to connect to DB2 database.

Ok DB2.
So indeed this can only be set as a property => https://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.5.0/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_cjvjcsec.html

I did not find much about this in sequel documentation, so I took a look in the github repository and found a reference to positioning such option into the jdbc_properties. Can you please try to set it as such

input {
  jdbc {
    [...]
    sequel_opts => {
      jdbc_properties => {"securityMechanism" => "7"}
    }
  }
}

HTH

jdbc_properties is not a valid option for logstash jdbc plugin.

Please read carefully, You need to put jdbc_properties inside the sequel_opts

It did work indeed.. with sequel_opts Thanks a lot. Have been trying this for a while...