Install and run Elastic Filebeat as a Docker container.
filebeat_config:
processors:
- add_cloud_metadata: ~
output.elasticsearch:
hosts:
- localhost
filebeat.autodiscover:
providers:
- type: docker
container.ids:
- "*"
filebeat.inputs:
- type: docker
containers.ids:
- "*"
processors:
- add_docker_metadata: ~
filebeat_enabled: true
filebeat_image: docker.elastic.co/beats/filebeat-oss:6.4.0
filebeat_path: "/opt/filebeat"
filebeat_service: filebeat
- name: servers
hosts: "{{ target }}"
gather_facts: yes
roles:
- "{{ larslevie.filebeat }}"
vars:
target: filebeat