diff --git a/content/docs/logging-infrastructure/fluentbit.md b/content/docs/logging-infrastructure/fluentbit.md index c55ed6f92..4954425f6 100644 --- a/content/docs/logging-infrastructure/fluentbit.md +++ b/content/docs/logging-infrastructure/fluentbit.md @@ -96,6 +96,35 @@ The following sections show you some examples on configuring Fluent Bit. For the > Note: These examples use the traditional method that configures the Fluent Bit deployment using **spec.fluentbit** section of {{% xref "/docs/logging-infrastructure/logging.md" %}}. +## Containerd log fields + +The following example defines a custom Fluent Bit parser that places the parsed containerd log messages into the `log` field instead of the `message` field to be backwards compatible with docker container runtimes. + +```yaml +apiVersion: logging.banzaicloud.io/v1beta1 +kind: FluentbitAgent +metadata: + name: containerd +spec: + inputTail: + Parser: cri-log-key + # Parser that populates `log` instead of `message` to enable the Kubernetes filter's Merge_Log feature to work + # Mind the indentation, otherwise Fluent Bit will parse the whole message into the `log` key + customParsers: | + [PARSER] + Name cri-log-key + Format regex + Regex ^(?