elasticsearch 从日志存储更新到弹性搜索失败
我想用logstash解析一个简单的日志文件,并将结果发布到elastic search。我已根据配置日志存储 但是Logstash报告了这个错误:
elasticsearch 从日志存储更新到弹性搜索失败,
elasticsearch,logstash,
elasticsearch,Logstash,我想用logstash解析一个简单的日志文件,并将结果发布到elastic search。我已根据配置日志存储 但是Logstash报告了这个错误: Attempted to send a bulk request to Elasticsearch configured at '["http://localhost:9200/"]', but Elasticsearch appears to be unreachable or down! {:client_config=>{:hosts=
Attempted to send a bulk request to Elasticsearch configured at '["http://localhost:9200/"]',
but Elasticsearch appears to be unreachable or down!
{:client_config=>{:hosts=>["http://localhost:9200/"], :ssl=>nil,
:transport_options=>{:socket_timeout=>0, :request_timeout=>0, :proxy=>nil,
:ssl=>{}}, :transport_class=>Elasticsearch::Transport::Transport::HTTP::Manticore,
:logger=>nil, :tracer=>nil, :reload_connections=>false, :retry_on_failure=>false,
:reload_on_failure=>false, :randomize_hosts=>false}, :error_message=>"Connection refused",
:level=>:error}
我的配置如下所示:
input { stdin{} }
filter {
grok {
match => { "message" => "%{NOTSPACE:demo}"}
}
}
output {
elasticsearch { hosts => "localhost:9200"}
}
当然,打电话时可以使用弹性搜索
版本:logstash-2.0.0、elasticsearch-2.0.0
OSX
我发现了一个类似的问题。但这似乎是旧版logstash中的一个bug。我将localhost更改为127.0.0.1 这项工作:
output {
elasticsearch { hosts => "127.0.0.1:9200"}
}