Logstash Jdbc input Plugin configuration with SSL cert information


Iam new to Logstash. My project requires to configure logstash with jdbc input plugin.Below is the conf file I had used.

input {
jdbc {
jdbc_driver_library => "lib\jars\mongodb_unityjdbc_full.jar"
jdbc_driver_class => "Java::mongodb.jdbc.MongoDriver"
jdbc_connection_string => "jdbc:mongo://testdb:27017/dbtest? ssl=true&authMechanism=SCRAM-SHA-1"
jdbc_user => "test"
jdbc_password => "Asdf~123"
jdbc_validate_connection => true
statement => "Select userId as id,firstName as firstname, lastName as lastname From IntUser"

I have my SSL CA and key file . How do I configure my conf file to set the those cert information ?

Any help or guidance on this would be of great help.


Hi Mullan,

Take a look at the following documentation: https://jdbc.postgresql.org/documentation/head/connect.html.

In short - the connection string should include the “ssl=true” parameter.

Hope that helps :slight_smile:

Hi Ramicoh,

Thank you for the reply.
My connection string already has ssl =true. I wanted to include the cert information because of two way authentication.

I had done a workaround to include them as jvm options.

jvm.options file i had included the following

Hope this helps someone.

1 Like

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