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-outputFluentd 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 January 15, 2026: Merge 5577547291e90495a90e1d6d0b91fa3572705954 into e6b6700e180c0d84b1f706e59d19f16be470081a (6c4670a)