6
我在將logstash配置爲輸出到AWS EC2上的Elasticsearch集羣時遇到問題。在AWS EC2上將Logstash輸出到Elasticsearch
我使用Logstash 1.1.5版和Elasticsearch 1.19.8。
這是logstash我的輸出配置:
output {
stdout { debug => true debug_format => "json"}
elasticsearch {
cluster => "logstash-searcher"
node_name => "logstash-indexer"
}
}
,這是elasticsearch.yml相應的配置
cluster.name: logstash-searcher
path.data: /usr/local/elasticsearch/data
path.work: /usr/local/elasticsearch/tmp
path.logs: /usr/local/elasticsearch/logs
path.plugins: /usr/local/elasticsearch/plugins
bootstrap.mlockall: true
cloud.aws.region: eu-west-1
cloud.aws.access_key: --
cloud.aws.secret_key: --
discovery.type: ec2
discovery.ec2.host_type: public_ip
discovery.ec2.groups: elasticsearch
gateway.type: s3
gateway.s3.bucket: es-logstash
transport.tcp.port: 9300-9400
我使用開始logstash:
java -jar logstash-1.1.5-monolithic.jar agent -f shipper.conf
並經過一段時間的啓動我得到這些失敗:
Failed to index an event, will retry {:exception=>org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [1m],
我懷疑logstash需要使用類似於cloud-aws的東西來使其elasticsearch客戶端能夠找到集羣。有沒有人有一個適用於aws的示例配置?
對於那些想知道在哪裏下載cloud-aws插件的人來說,url就像這樣:https://download.elasticsearch.org/elasticsearch/elasticsearch-cloud-aws/elasticsearch-cloud-aws-1.12.0.zip – zimbatm