通过 HTTPS 的 Filebeat
Filebeat over HTTPS
我完全是 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"
提前致谢。
我发现了错误:
我的自签名证书适用于 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
我完全是 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"
提前致谢。
我发现了错误:
我的自签名证书适用于 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