Record Modifier 🔗︎

Overview 🔗︎

Modify each event record.

Configuration 🔗︎

RecordModifier 🔗︎

Variable Name Type Required Default Description
prepare_value string No - Prepare values for filtering in configure phase. Prepared values can be used in . You can write any ruby code.
char_encoding string No - 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.
remove_keys string No - A comma-delimited list of keys to delete
whitelist_keys string No - This is exclusive with remove_keys
replaces []Replace No - Replace specific value for keys
records []Record No - Add records docs at: https://github.com/repeatedly/fluent-plugin-record-modifier
Records are represented as maps: key: value

Example Record Modifier filter configurations 🔗︎

apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:
 name: demo-flow
spec:
 filters:
   - record_modifier:
       records:
       - foo: "bar"
 selectors: {}
 outputRefs:
   - 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. 🔗︎

Variable Name Type Required Default Description
key string Yes - Key to search for
expression string Yes - Regular expression
replace string Yes - Value to replace with