sahinguler
(sahin guler)
January 5, 2022, 4:40am
1
Hi everyone,
I use filebeat for storing docker logs. My docker containers logs path is /home/docker/containers/${data.docker.container.id}/*.log .
But filebeat scans /var/lib/docker/containers/${data.docker.container.id}/*.log defaultly.
How can I give my path for scanning our datas?
In other words how can I change Configured paths to my log folder?
Thanks
sahinguler
(sahin guler)
January 5, 2022, 5:41am
2
My filebeat.yml file as folliwing:
filebeat.inputs:
#------------------------------ Docker input --------------------------------
type: docker
enabled: true
encoding: "utf-8"
containers.ids:
- " * "
containers.paths:
- /home/docker/containers/${data.docker.container.id}/*.log
multiline.pattern: '^[[0-9]{4}-[0-9]{2}-[0-9]{2}'
multiline.negate: true
multiline.match: after
exclude_lines: ["^\s+[\-`('.|_]"] # drop asciiart lines
processors:
- add_host_metadata: ~
- add_docker_metadata: ~
#=========================== Filebeat outputs==============================
output.logstash:
hosts: ["logstash:5044"]
Hi @sahinguler ,
which version of filebeat are you using?
docker input is deprecated in version 7.2.0.
Try using container input instead. You can see how to set the path here .
system
(system)
Closed
February 3, 2022, 8:05am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.