我已在本地安装了logstash,并且我试图在elasticsearch集群之间复制索引。
我在端口9210上配置了本地elasticsearch,并在IBM Bluemix中托管了远程ES群集。我已经设置了logstash.conf,如下所示:
input {
elasticsearch {
hosts => [ "localhost:9210" ]
index => "lon02-daily-2017.08.30"
size => 500
scroll => "5m"
docinfo => true
}
}
output {
# We write to the "new" cluster
elasticsearch {
hosts => ["https://xxxxxxx:19459/"]
user => "xxxxxx"
password => "xxxxxxx"
index => "%{[@metadata][_index]}"
document_type => "%{[@metadata][_type]}"
document_id => "%{[@metadata][_id]}"
}
# We print dots to see it in action
stdout {
codec => "dots"
}
}
但是,当我运行./logstash -f logstash.conf时,我收到以下错误(在下面发布),表明logstash无法连接到远程群集,但是我可以通过curl联系它,如下所示: curl -u xxxxxx:xxxxxxx https://xxxxxxx:19459/
Attempted to send a bulk request to Elasticsearch configured at
["https://xxxx:19459/"]', but an error occurred and it failed!
Are you sure you can reach elasticsearch from this machine using the configuration provided?
我认为logstash不使用logstash.conf中的凭据。谁能发现我在这里做错了什么?