【问题标题】:Filebeat over HTTPS通过 HTTPS 的 Filebeat
【发布时间】:2020-11-23 22:44:15
【问题描述】:

我是 elk 的新手,但我目前正在通过 docker-compose(https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-docker.html TLS 部分)部署 ELK 堆栈。

Elasticsearch 和 Kibana 在 HTTPS 中正常工作

但是,我不明白如何通过 HTTPS 启用 Filebeat。我想发送位于另一台服务器上的 nginx 日志(通过互联网,因此我不想以明文形式发送日志)。在 HTTP 中一切正常,但是当我切换到 HTTPS 并重新加载 Filebeat 时,我收到以下消息:

Error: ... Get https://10.15.0.12:9200: x509: certificate is valid for 127.0.0.0.1, not 10.15.0.12

我知道我做错了什么,但我没有找到 Filebeat over HTTPS 的答案...

这是我的 Filebeat 配置:

output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["10.15.0.12:9200"]

  # Protocol - either `http` (default) or `https`.
  protocol: "https"

  # Authentication credentials - either API key or username/password.
  username: "elastic"
  password: "myelasticpassword"

提前致谢。

【问题讨论】:

    标签: elasticsearch elastic-stack filebeat elk


    【解决方案1】:

    我发现了错误:

    我的自签名证书适用于 127.0.0.1 主机。

    我在 instances.yml

    中更改了 IP

    然后我更改了我的 filebeat 配置:

    output.elasticsearch:
      # Array of hosts to connect to.
      hosts: ["xx.xx.xx.xx:9200"]
    
      # Protocol - either `http` (default) or `https`.
      protocol: "https"
    
      # Authentication credentials - either API key or username/password.
      #api_key: "id:api_key"
      username: "elastic"
      password: "mypassword"
      ssl.verification_mode: none
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-24
      • 2021-03-07
      • 2016-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-20
      相关资源
      最近更新 更多