-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfilebeat-logs.yml
65 lines (59 loc) · 1.92 KB
/
filebeat-logs.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
54
55
56
57
58
59
60
61
62
63
64
65
filebeat.inputs:
# Default input
- type: container
paths:
- /var/log/containers/*.log
multiline:
pattern: '^([[:space:]]+at|Caused[[:space:]]by|[[:space:]]+\.\.\.|[[:space:]]name:|^[[:space:]]*[{}]|[[:space:]]+\"[[:alnum:]]+|[[:blank:]]+[[:alnum:]]+|[[:space:]]+\-[[:space:]]+(Health|Checking)|^Message[[:space:]]History$|^Stacktrace$|^RouteId[[:space:]]+Processor|[[:space:]]*(\[[\w\.\s]+\]\s*){2,}|^\-{5,}:\s[\w\.]+:)'
negate: false
match: after
processors:
# Drop empty messages
- drop_event:
when:
regexp:
message: '^[^A-Za-z0-9{}]*$'
# Add kubernetes metadata
- add_kubernetes_metadata:
host: ${NODE_NAME}
in_cluster: true
default_indexers.enabled: true
matchers:
- logs_path:
logs_path: "/var/log/containers/"
# drop logs from ignored namespaces
- drop_event:
when:
or:
- equals:
kubernetes.namespace: "openshift-sdn"
- equals:
kubernetes.namespace: "openshift-logging"
- equals:
kubernetes.namespace: "openshift-cluster-version"
- equals:
kubernetes.namespace: "openshift-etcd-operator"
- equals:
kubernetes.namespace: "openshift-cluster-samples-operator"
# Drop messages from ignored pods
- drop_event:
when:
or:
- regexp:
kubernetes.pod.name: '^olm-operator-.+'
- regexp:
kubernetes.pod.name: '^packageserver-.+'
processors:
- add_cloud_metadata:
providers:
- aws
- add_host_metadata:
netinfo.enabled: false
setup.ilm.enabled: false
output.elasticsearch:
bulk_max_size: 2500
worker: 2
hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
username: ${ELASTICSEARCH_USERNAME}
password: ${ELASTICSEARCH_PASSWORD}
protocol: ${ELASTICSEARCH_PROTOCOL}