How to use jdbc input plugin for to migrate data from progresql to elasticsearch?

I have Installed logstash 5.0 and I'm trying to get the data from progresql table to json lines.This is the error I'm getting please help.

and the conf file is like this

file: simple-out.conf

input {
jdbc {
# Postgres jdbc connection string to our database, mydb
jdbc_connection_string => "jdbc:postgresql://localhost:5432/postgres"
# The user we wish to execute our statement as
jdbc_user => "postgres"
# The path to our downloaded jdbc driver
jdbc_driver_library => "/home/kartheek/Desktop/postgresql-9.4.1212.jre6.jar"
# The name of the driver class for Postgresql
jdbc_driver_class => "org.postgresql.Driver"
# our query
statement => "SELECT * from contacts"
}
}
output {
stdout { codec => json_lines }
}

Here's the documentation for the settings file: https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html

Either make sure there's such a file in one of the listed locations or use the --path.settings option to point Logstash to another location.

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