Logstash期待#出了什么问题

时间:2016-12-08 10:40:06

标签: elasticsearch apache-kafka logstash

我希望从kafka主题发送数据" test"到弹性搜索索引" twitter"通过logstash,但我的困惑不起作用 错误是

  

reason =>"预期的#,=>之一在第1行,第101列(字节101)之后   输入{kafka {bootstrap_servers => \" localhost:9092 \"   topics => \" test \"} filter {}输出{elasticsearch"}

input { kafka { bootstrap_servers=>"localhost:9092" topics=>"test"} filter{}  output{ elasticsearch {hosts=>["127.0.0.1:9200"]}}

1 个答案:

答案 0 :(得分:1)

好像你错过了input的结束括号:

input { 
    kafka { 
        bootstrap_servers=>"localhost:9092" 
        topics=>"test"
    }
}   <---- this bracket was missing in yours

filter{}  

output { 
    elasticsearch {
        hosts => ["127.0.0.1:9200"]
    }
}