Concat Filter 🔗︎
Overview 🔗︎
Fluentd Filter plugin to concatenate multiline log separated in multiple events.
Configuration 🔗︎
Concat 🔗︎
Variable Name | Type | Required | Default | Description |
---|---|---|---|---|
key | string | No | - | Specify field name in the record to parse. If you leave empty the Container Runtime default will be used. |
separator | string | No | “\n” | The separator of lines. |
n_lines | int | No | - | The number of lines. This is exclusive with multiline_start_regex. |
multiline_start_regexp | string | No | - | The regexp to match beginning of multiline. This is exclusive with n_lines. |
multiline_end_regexp | string | No | - | The regexp to match ending of multiline. This is exclusive with n_lines. |
continuous_line_regexp | string | No | - | The regexp to match continuous lines. This is exclusive with n_lines. |
stream_identity_key | string | No | - | The key to determine which stream an event belongs to. |
flush_interval | int | No | - | The number of seconds after which the last received event log will be flushed. If specified 0, wait for next line forever. |
timeout_label | string | No | - | The label name to handle events caused by timeout. |
use_first_timestamp | bool | No | False | Use timestamp of first record when buffer is flushed. |
partial_key | string | No | - | The field name that is the reference to concatenate records |
partial_value | string | No | - | The value stored in the field specified by partial_key that represent partial log |
keep_partial_key | bool | No | False | If true, keep partial_key in concatenated records |
use_partial_metadata | string | No | - | Use partial metadata to concatenate multiple records |
keep_partial_metadata | string | No | - | If true, keep partial metadata |
Example Concat
filter configurations 🔗︎
apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:
name: demo-flow
spec:
filters:
- concat:
partial_key: "partial_message"
separator: ""
n_lines: 10
selectors: {}
localOutputRefs:
- demo-output
Fluentd Config Result 🔗︎
<filter **>
@type concat
@id test_concat
key message
n_lines 10
partial_key partial_message
</filter>