es 2.4.1logstash 2.4.0
我将数据从本地发送到elasticsearch创建索引" pica"。我使用了以下conf文件。
input {
file {
path => "C:OutputReceive.txt"
start_position => "beginning"
codec => json_lines
}
}
output {
elasticsearch {
hosts => "http://localhost:9200/"
index => "pica"
}
stdout{
codec => rubydebug
}
}
我在LogStash提示符或Elasticsearch群集中都看不到任何输出。当我看到.sincedb文件时,它具有以下代码: 612384816-350504-4325376 0 0 3804
我可以知道这里有什么问题吗?
谢谢
我想您错过了hosts
值的Square Brackets []文档。因此,它应该看起来像:
elasticsearch {
hosts => ["localhost:9200"]
index => "pica"
}
或:
hosts => ["127.0.0.1"] OR hosts => ["localhost"]