我已经使用tdagent成功连接了本地机器上的elasticsearch,但是在暂存环境中我需要连接aws elasticsearch,如果我使用ruby安装了fluentd,那么就有一个插件
gem 'fluent-plugin-aws-elasticsearch-service'
但是当使用 fluentd 和 tdagent 时,我们如何配置 aws-elasticsearch?
<match catalog>
@type elasticsearch
host https://elastic_devel_aws.com
# port 9200
logstash_format true
include_timestamp true
index_name _logs_test
flush_interval 10s
reconnect_on_error true
reload_on_failure true
reload_connections false
request_timeout 120s
<buffer>
@type file
flush_interval 10s
retry_type periodic
retry_forever true
retry_wait 10s
chunk_limit_size 16Mb
queue_limit_length 4096
total_limit_size 60Gb
path /var/lib/td-agent/buffers/output_elasticsearch-1
</buffer>
</match>
当尝试这样的事情时
Could not communicate to Elasticsearch, resetting connection and trying again. getaddrinfo: Name or service not known (SocketError)