Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit c6ab9d1

Browse files
committed
Added filebeat input of type docker
1 parent 59025e3 commit c6ab9d1

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

elk/beats/filebeat/config/filebeat.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ filebeat.autodiscover:
2929
- type: docker
3030
containers.ids:
3131
- "${data.docker.container.id}"
32-
paths:
33-
- /var/lib/docker/containers/${data.docker.container.id}/*.log
34-
# exclude_lines: ["^\\s+[\\-`('.|_]"] # drop asciiart lines
3532

3633
#=========================== Filebeat inputs ==============================
3734
filebeat.inputs:
@@ -40,16 +37,24 @@ filebeat.inputs:
4037
enabled: true
4138
containers.ids:
4239
- "*"
40+
paths:
41+
- /var/lib/docker/containers/${data.docker.container.id}/*.log
42+
# json.message_key: log
43+
# json.add_error_key: true
44+
# json.keys_under_root: true
45+
exclude_lines: ["^\\s+[\\-`('.|_]"] # drop asciiart lines
46+
multiline.pattern: "^\t|^[[:space:]]+(at|...)|^Caused by:"
47+
multiline.match: after
4348
processors:
4449
- add_docker_metadata: ~
4550
- add_cloud_metadata: ~
4651
- add_locale: ~
52+
4753
#------------------------------ Log input --------------------------------
4854
# - type: log
4955
# enabled: true
5056
# paths:
51-
# # path to jenkins build logs
52-
# - /var/lib/docker/volumes/jenkins_home/_data/jobs/*/builds/*/log
57+
# - '/var/lib/docker/containers/*/*.log'
5358
# json.message_key: log
5459
# json.add_error_key: true
5560
# json.keys_under_root: true
@@ -59,6 +64,18 @@ filebeat.inputs:
5964
# - add_locale: ~
6065
# multiline.pattern: "^\t|^[[:space:]]+(at|...)|^Caused by:"
6166
# multiline.match: after
67+
#
68+
# - type: log
69+
# enabled: false
70+
# paths:
71+
# # path to jenkins build logs
72+
# - /var/lib/docker/volumes/jenkins_home/_data/jobs/*/builds/*/log
73+
# json.message_key: log
74+
# json.add_error_key: true
75+
# json.keys_under_root: true
76+
# multiline.pattern: '^[[:space:]]+|^Caused by:'
77+
# multiline.negate: false
78+
# multiline.match: after
6279

6380
#========================== Elasticsearch output ===============================
6481
output.elasticsearch:

0 commit comments

Comments
 (0)