My logstash.conf file and mysql-connector-java-5.1.38.jar both are in F:\Software\logstash-5.5.1\logstash-5.5.1\bin location
Getting below error while running conf file in cmd :
F:\Software\logstash-5.5.1\logstash-5.5.1\bin>logstash -f logstash.conf
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Sending Logstash's logs to F:/Software/logstash-5.5.1/logstash-5.5.1/logs which is now configured via log4j2.properties
[2017-08-03T16:01:17,142][ERROR][logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch
[2017-08-03T16:01:17,149][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Something is wrong with your configuration."}
Below is my conf file:
file: logstash.conf
input {
jdbc {
# MySql jdbc connection string to our database, testdb
jdbc_connection_string => "jdbc:mysql://localhost:3306/testdb"
# The user we wish to execute our statement as
jdbc_user => "root"
jdbc_password => "root"
# The path to our downloaded jdbc driver
jdbc_driver_library => "mysql-connector-java-5.1.38.jar"
# The name of the driver class for Postgresql
jdbc_driver_class => "com.mysql.jdbc.Driver"
# our query
statement => "SELECT * from testtable"
}
}
output {
stdout { codec => json_lines }
elasticsearch{
hosts => "http://localhost:9200"
protocol => "http"
index => "test-migrate"
document_type => "data"
}
}
Kindly suggest what's going wrong in my configuration.