diff --git a/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml b/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml index 1df67f5cdf..f9187519e3 100644 --- a/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml +++ b/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml @@ -1 +1,245 @@ -{{ tpl (toYaml .Values.otellogs.config | replace ": '{{" ": {{" | replace "}}'" "}}") . | nindent 2 }} +extensions: + health_check: {} +{{- if .Values.sumologic.logs.persistence.enabled }} + file_storage: + directory: {{ .Values.sumologic.logs.persistence.storageDirectory }} + timeout: 10s +{{- end }} + pprof: {} +service: + telemetry: + logs: + level: {{ .Values.otellogs.logLevel | quote }} + extensions: + - health_check +{{- if .Values.sumologic.logs.persistence.enabled }} + - file_storage +{{- end }} + - pprof + pipelines: + logs/containers: + receivers: + - filelog/containers + processors: + - batch + exporters: + - otlphttp +{{- if .Values.sumologic.logs.systemd.enabled }} + logs/systemd: + receivers: + - journald + processors: + - logstransform/systemd + - batch + exporters: + - otlphttp +{{- end }} +receivers: + filelog/containers: + include: + - /var/log/pods/*/*/*.log + start_at: beginning + ## sets fingerprint_size to 17kb in order to match the longest possible docker line (which by default is 16kb) + ## we want to include timestamp, which is at the end of the line + fingerprint_size: 17408 + include_file_path: true + include_file_name: false + operators: + ## Detect the container runtime log format + ## Can be: docker-shim, CRI-O and containerd + - id: get-format + type: router + routes: + - output: parser-docker + expr: 'body matches "^\\{"' + - output: parser-crio + expr: 'body matches "^[^ Z]+ "' + - output: parser-containerd + expr: 'body matches "^[^ Z]+Z"' + ## Parse CRI-O format + - id: parser-crio + type: regex_parser + regex: '^(?P