如何设置elasticsearch和filebeat

How to set up elasticsearch and filebeat

我已经安装了 elasicsearch 和 filebeat。

filebeat 配置:

output.elasticsearch:
  hosts: ["https://myElastic:9200"]
  username: "user"
  password: "password"

能不能请问一下,elasticsearch.xml需要配置什么吗? 我现在遇到的问题是我在 elasticsearch 中看不到来自 filebeat 的数据。

你的 filebeat 配置应该有输入行。

filebeat.yml :

filebeat.inputs:
- type: log
  enabled: true
  paths:
    - /mylog/*.log

output.elasticsearch:
  hosts: ["https://myElastic:9200"]
  username: "user"
  password: "password"

我建议您将 logstash 与 filebeat 结合使用。 您可以在下面的 github 存储库中找到如何轻松配置它。

docker-compose config : ELK with Filebeat by Docker-compose