Search code examples
elasticsearchfilebeat

How to set up elasticsearch and filebeat


I have installed elasicsearch and filebeat.

The filebeat config:

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

Could you please tell me, do I need to configure something in elasticsearch. The problem that I have now is that I do not see data from filebeat in elasticsearch.


Solution

  • your filebeat config should have input lines.

    filebeat.yml :

    filebeat.inputs:
    - type: log
      enabled: true
      paths:
        - /mylog/*.log
    
    output.elasticsearch:
      hosts: ["https://myElastic:9200"]
      username: "user"
      password: "password"
    

    and I recommend you use logstash with filebeat. You can find how to config it easily in below github repository.

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