【问题标题】:securely connect to open distro elastic from packetbeat从 packetbeat 安全地连接到 open 发行版弹性
【发布时间】:2020-06-13 23:40:05
【问题描述】:

我可以使用 curl 连接到弹性服务器,如下所示。

# curl --user "root:xxxxx"  https://search-testme-gvzxezayzzc4pcw2xcyvndb6jq.us-east-1.es.amazonaws.com/_aliases

我得到了预期的响应,这意味着凭据是正确的。

{".kibana_3506402_root":{"aliases":{}},".opendistro_security":{"aliases":{}},".kibana_1":{"aliases":{".kibana":{}}}}

但相同的凭据在 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"

根据日志,即使配置文件中提到了端口 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)

如何通过 packetbeat 使用开放发行版连接到 AWS elastic? 如果我使用 AWS 托管的弹性云,类似的配置可以正常工作。

【问题讨论】:

  • 在 curl 中,您点击端口 443,这是 https 模式的默认端口。也许是这样。
  • 您找到原因了吗?会不会和License有关?

标签: elasticsearch aws-elasticsearch packetbeat


【解决方案1】:

有两点要记住:

1) 您需要 packetbeat 的“oss”(开源版本)才能使其工作。

2) 连接到 443 端口

详细说明可以在这里找到...

http://oksoft.blogspot.com/2020/03/packetbeat-to-elastic-server-hosted-by.html

【讨论】:

    猜你喜欢
    • 2021-07-04
    • 1970-01-01
    • 2023-03-31
    • 2016-10-06
    • 1970-01-01
    • 1970-01-01
    • 2019-09-05
    • 2022-08-03
    • 1970-01-01
    相关资源
    最近更新 更多