-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy path01-filebeat.yml
53 lines (41 loc) · 1.47 KB
/
01-filebeat.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# ============================== Filebeat inputs ===============================
filebeat.inputs:
- type: filestream
id: 01-plaintext-filestream
enabled: true
paths:
- ${app_log}
# exceptions are reported on multiple lines
# other examples can be found in doc : https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html#multiline
parsers:
- multiline:
type: pattern
pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
negate: true
match: after
# add service fields
fields_under_root: true
fields:
service.name: ${service_name}
event.dataset: ${service_name}
# ============================== Filebeat modules ==============================
filebeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
# ======================= Elasticsearch template setting =======================
setup.template.settings:
index.number_of_shards: 1
# =============================== Elastic Cloud ================================
cloud.id: "${cloud_id:CHANGEME}"
cloud.auth: "${cloud_auth:CHANGEME}"
# ================================== Outputs ===================================
output.elasticsearch:
hosts: [ "${elasticsearch_host:CHANGEME}" ]
pipeline: log-ingest-plaintext
# ================================= Processors =================================
processors:
- add_host_metadata:
when.not.contains.tags: forwarded
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~