Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

logstash to elasticsearch show Uknown setting

I just use very simple config which log the data from a file to elasticsearch.

Here is my config

input {
    file {
        path => "/var/log/logstash/logstash.log"
        start_position => beginning 
    }
}
output {
   elasticsearch {
       protocol => "http"
   }
   stdout {}
}

and when I start logstash by

./bin/logstash -f /path/to/mycofig/i-file-o-es.conf

I get error

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

I can make this config work by removing protocol=> so I think my plugin is installed correctly.

Anyone met this issue before? Thanks!

like image 749
StevenR Avatar asked Oct 06 '15 06:10

StevenR


1 Answers

I guess you're using Logstash 2.0 beta. In that latest version, they've revamped the elasticsearch output plugin which now doesn't have any protocol setting anymore, since the plugin defaults to using the http protocol.

If you want to be able to specify the protocol setting (i.e. to use node or transport protocol), you need to use the new elasticsearch_java output plugin

like image 147
Val Avatar answered Nov 16 '22 15:11

Val