Search code examples
logstashfilebeat

How can I give linux hosted logs as input path in filebeat.yml?


I've linux hosted application which has logs and i want to harvest them with use filebeat. How can i give input path in filebeat.yml file?


Solution

  • Assuming you already have a filebeat installed on the linux system. You can configure filebeat to use log input and point the path to location where the logs reside. Check this.

    Simple Example :

    filebeat.inputs:
      - type: log
        enabled: true
        paths:
          - /usr/share/apps/logs/*.log
    output.elasticsearch:
        hosts: '${ELASTICSEARCH_HOSTS}'