简体   繁体   English

logstash到elasticsearch显示Uknown设置

[英]logstash to elasticsearch show Uknown setting

I just use very simple config which log the data from a file to elasticsearch. 我只是使用非常简单的配置,将数据从文件记录到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 当我开始使用logstash时

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

I get error 我收到错误

Unknown setting 'protocol' for elasticsearch {:level=>:error} springsearch {:level =>:error}的未知设置'protocol'

I can make this config work by removing protocol=> so I think my plugin is installed correctly. 我可以通过删除protocol =>使这个配置工作,所以我认为我的插件安装正确。

Anyone met this issue before? 有没有人遇到过这个问题? Thanks! 谢谢!

I guess you're using Logstash 2.0 beta. 我想你正在使用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 . 在最新版本中,他们已经修改了elasticsearch输出插件 ,该插件现在不再具有任何protocol设置,因为插件默认使用http协议

If you want to be able to specify the protocol setting (ie to use node or transport protocol), you need to use the new elasticsearch_java output plugin 如果您希望能够指定protocol设置(即使用nodetransport协议),则需要使用新的elasticsearch_java输出插件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM