Record Modifier
Record Modifier
Overview
Modify each event record.
Configuration
RecordModifier
char_encoding (string, optional)
Fluentd including some plugins treats logs as a BINARY by default to forward. To overide that, use a target encoding or a from:to encoding here.
prepare_value (string, optional)
Prepare values for filtering in configure phase. Prepared values can be used in <record>
. You can write any ruby code.
records ([]Record, optional)
Add records. Records are represented as maps: key: value
. For details, see https://github.com/repeatedly/fluent-plugin-record-modifier.
remove_keys (string, optional)
A comma-delimited list of keys to delete
replaces ([]Replace, optional)
Replace specific value for keys
whitelist_keys (string, optional)
This is exclusive with remove_keys
Example Record Modifier
filter configurations
apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:
name: demo-flow
spec:
filters:
- record_modifier:
records:
- foo: "bar"
selectors: {}
localOutputRefs:
- demo-output
Fluentd config result:
<filter **>
@type record_modifier
@id test_record_modifier
<record>
foo bar
</record>
</filter>
Replace Directive
Specify replace rule. This directive contains three parameters.
expression (string, required)
Regular expression
key (string, required)
Key to search for
replace (string, required)
Value to replace with
Last modified November 21, 2024: Merge pull request #264 from kube-logging/avoid-empty-announcement-bar (dee354e)