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