-
Notifications
You must be signed in to change notification settings - Fork 183
/
Copy pathconfig.yaml
158 lines (152 loc) · 4.36 KB
/
config.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
exporters:
otlphttp:
endpoint: http://${LOGS_METADATA_SVC}.${NAMESPACE}.svc.{{ .Values.sumologic.clusterDNSDomain }}.:4318
sending_queue:
queue_size: 10
# this improves load balancing at the cost of more network traffic
disable_keep_alives: true
{{- if eq .Values.debug.logs.collector.print true }}
debug:
verbosity: detailed
{{- end }}
extensions:
file_storage:
compaction:
directory: /var/lib/storage/otc
on_rebound: true
directory: /var/lib/storage/otc
timeout: 10s
health_check: {}
pprof: {}
processors:
batch:
send_batch_max_size: 2000
send_batch_size: 1000
timeout: 1s
{{- if or .Values.sumologic.logs.systemd.enabled .Values.sumologic.logs.kubelet.enabled }}
## copy _SYSTEMD_UNIT, SYSLOG_FACILITY, _HOSTNAME and PRIORITY from body to attributes
## so they can be used by metadata processors same way like for fluentd
## build fluent.tag attribute as `host.{_SYSTEMD_UNIT}`
logstransform/systemd:
operators:
- from: body._SYSTEMD_UNIT
to: attributes._SYSTEMD_UNIT
type: copy
- from: body.SYSLOG_FACILITY
to: attributes.SYSLOG_FACILITY
type: copy
- from: body._HOSTNAME
to: attributes._HOSTNAME
type: copy
- from: body.PRIORITY
to: attributes.PRIORITY
type: copy
- field: attributes["fluent.tag"]
type: add
value: EXPR("host." + attributes["_SYSTEMD_UNIT"])
- field: body.__CURSOR
type: remove
- field: body.__MONOTONIC_TIMESTAMP
type: remove
{{- end }}
receivers:
{{- if .Values.sumologic.logs.container.enabled }}
{{ tpl (.Files.Get "conf/logs/collector/common/filelog_receiver.yaml") . | nindent 2 }}
{{- end }}
{{- if or .Values.sumologic.logs.systemd.enabled .Values.sumologic.logs.kubelet.enabled }}
journald:
directory: /var/log/journal
## This is not a full equivalent of fluent-bit filtering as fluent-bit filters by `_SYSTEMD_UNIT`
## Here is filtering by `UNIT`
units:
{{- if .Values.sumologic.logs.systemd.units }}
{{ toYaml .Values.sumologic.logs.systemd.units | nindent 6 }}
{{- else }}
{{- if .Values.sumologic.logs.systemd.enabled }}
- addon-config.service
- addon-run.service
- cfn-etcd-environment.service
- cfn-signal.service
- clean-ca-certificates.service
- containerd.service
- coreos-metadata.service
- coreos-setup-environment.service
- coreos-tmpfiles.service
- dbus.service
- docker.service
- efs.service
- etcd-member.service
- etcd.service
- etcd2.service
- etcd3.service
- etcdadm-check.service
- etcdadm-reconfigure.service
- etcdadm-save.service
- etcdadm-update-status.service
- flanneld.service
- format-etcd2-volume.service
- kube-node-taint-and-uncordon.service
- ldconfig.service
- locksmithd.service
- logrotate.service
- lvm2-monitor.service
- mdmon.service
- nfs-idmapd.service
- nfs-mountd.service
- nfs-server.service
- nfs-utils.service
- node-problem-detector.service
- ntp.service
- oem-cloudinit.service
- rkt-gc.service
- rkt-metadata.service
- rpc-idmapd.service
- rpc-mountd.service
- rpc-statd.service
- rpcbind.service
- set-aws-environment.service
- system-cloudinit.service
- systemd-timesyncd.service
- update-ca-certificates.service
- user-cloudinit.service
- var-lib-etcd2.service
{{- end }}
{{- end }}
{{- if .Values.sumologic.logs.kubelet.enabled }}
- kubelet.service
{{- end }}
{{- end }}
service:
extensions:
- health_check
- file_storage
- pprof
pipelines:
{{- if .Values.sumologic.logs.container.enabled }}
logs/containers:
exporters:
- otlphttp
{{- if eq .Values.debug.logs.collector.print true }}
- debug
{{- end }}
processors:
- batch
receivers:
- filelog/containers
{{- end }}
{{ if or .Values.sumologic.logs.systemd.enabled .Values.sumologic.logs.kubelet.enabled}}
logs/systemd:
exporters:
- otlphttp
{{- if eq .Values.debug.logs.collector.print true }}
- debug
{{- end }}
processors:
- logstransform/systemd
- batch
receivers:
- journald
{{- end }}
telemetry:
logs:
level: {{ .Values.otellogs.logLevel | quote }}