[英]securely connect to open distro elastic from packetbeat
I can connect to elastic server using curl as shown below.我可以使用 curl 连接到弹性服务器,如下所示。
# curl --user "root:xxxxx" https://search-testme-gvzxezayzzc4pcw2xcyvndb6jq.us-east-1.es.amazonaws.com/_aliases
I get the expected response and it means the credentials are correct.我得到了预期的响应,这意味着凭据是正确的。
{".kibana_3506402_root":{"aliases":{}},".opendistro_security":{"aliases":{}},".kibana_1":{"aliases":{".kibana":{}}}}
But the same credentials are not working in packetbeat但是相同的凭据在 packetbeat 中不起作用
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["search-testme-gvzxezayzzc4pcw2xcyvndb6jq.us-east-1.es.amazonaws.com:80"]
# Optional protocol and basic auth credentials.
protocol: "https"
username: "root"
password: "xxxxx"
As per logs, it is trying to connect on port 9200 even if port 80 is mentioned in the config file.根据日志,即使配置文件中提到了端口 80,它也会尝试连接端口 9200。
# tail /var/log/packetbeat/packetbeat
2020-03-01T13:56:03.234Z ERROR pipeline/output.go:100 Failed to connect to backoff(elasticsearch(https://search-testme-gvzxezayzzc4pcw2xcyvndb6jq.us-east-1.es.amazonaws.com:9200)): Get https://search-testme-gvzxezayzzc4pcw2xcyvndb6jq.us-east-1.es.amazonaws.com:9200: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2020-03-01T13:56:03.234Z INFO pipeline/output.go:93 Attempting to reconnect to backoff(elasticsearch(https://search-testme-gvzxezayzzc4pcw2xcyvndb6jq.us-east-1.es.amazonaws.com:9200)) with 10 reconnect attempt(s)
How do I connect to AWS elastic using open distro through packetbeat?如何使用开放发行版通过 packetbeat 连接到 AWS elastic? Similar configuration works without any problem if I use elastic cloud hosted by AWS.
如果我使用 AWS 托管的弹性云,类似的配置工作没有任何问题。
There are 2 important points to remember:有2个要点要记住:
1) You need "oss" (Open Source Version) of packetbeat for this to work. 1)您需要 packetbeat 的“oss”(开源版本)才能工作。
2) Connect to 443 port 2)连接到443端口
Detailed instructions can be found here...详细说明可以在这里找到...
http://oksoft.blogspot.com/2020/03/packetbeat-to-elastic-server-hosted-by.html http://oksoft.blogspot.com/2020/03/packetbeat-to-elastic-server-hosted-by.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.