Error while loading logstash

Hi ,

i am unable to upload the data to elastic search using logstash ?

config file :

input {
jdbc {
jdbc_driver_library => "/home/ec2-user/ojdbc14.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@//ec2-14-12-11-100.eu-west-1.compute.amazonaws.com:1521/XE"
jdbc_user => "pin"
jdbc_password => "***"
statement_filepath => "./catalogue_info.sql"
}
}
filter {

mutate { add_field => [ "rec_id", "%{type}" ] }

}
output {
elasticsearch {
protocol => http
index => "cata_data"
document_type => "cata_info"
document_id => "%{type}"
hosts => "localhost:9200"
}

    stdout { codec => rubydebug }

}

shell script :

curl -XDELETE 'localhost:9200/catalogue_data'
echo "Creating catalogue_data index"

Create index:

curl -XPOST 'http://localhost:9200/catalogue_data'
echo

echo "Mapping the catalogue_info document"

Create Parent Mapping

curl -XPUT 'localhost:9200/catalogue_data/catalogue_info/_mapping' -d '
{ "catalogue_info" : {
"properties" : {
"type" : {"type" : "string","index" : "not_analyzed"},
"product" : {"type" : "integer"},
"siebel" : {"type" : "integer"},
"sap" : {"type" : "integer"}
}
}
}'
echo

echo "Populating Catalogue data.."
/home/ec2-user/logstash-2.3.4/bin/logstash -f catalogue_info.conf

Error :

Script Started..
Deleting the catalogue_data index..
{"acknowledged":true}Creating catalogue_data index
{"acknowledged":true}
Mapping the catalogue_info document
{"acknowledged":true}
Populating Catalogue data..
Settings: Default pipeline workers: 2
Unknown setting 'protocol' for elasticsearch {:level=>:error}
Pipeline aborted due to error {:exception=>#<LogStash::ConfigurationError: Something is wrong with your configuration.>, :backtrace=>["/home/ec2-user/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/config/mixin.rb:134:in config_init'", "/home/ec2-user/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/outputs/base.rb:63:ininitialize'", "/home/ec2-user/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/output_delegator.rb:74:in register'", "/home/ec2-user/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:181:instart_workers'", "org/jruby/RubyArray.java:1613:in each'", "/home/ec2-user/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:181:instart_workers'", "/home/ec2-user/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:136:in run'", "/home/ec2-user/logstash-2.3.4/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/agent.rb:473:instart_pipeline'"], :level=>:error}
stopping pipeline {:id=>"main"}
Script Finished !!

Unknown setting 'protocol' for elasticsearch {:level=>:error}

Here's your problem. The documentation for your version of Logstash lists all valid configuration options for the elasticsearch output.

may i know What are the configuration changes i need to do here.

Remove the invalid setting.

Thanks now its worked ..

after removing

protocol => http

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