Record Modifier
Record Modifier
Overview
Modify each event record.
Configuration
RecordModifier
prepare_value (string, optional)
Prepare values for filtering in configure phase. Prepared values can be used in
Default: -
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.
Default: -
remove_keys (string, optional)
A comma-delimited list of keys to delete
Default: -
whitelist_keys (string, optional)
This is exclusive with remove_keys
Default: -
replaces ([]Replace, optional)
Replace specific value for keys
Default: -
records ([]Record, optional)
Add records docs at: https://github.com/repeatedly/fluent-plugin-record-modifier Records are represented as maps: key: value
Default: -
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.
key (string, required) {#replace directive-key}
Key to search for
Default: -
expression (string, required) {#replace directive-expression}
Regular expression
Default: -
replace (string, required) {#replace directive-replace}
Value to replace with
Default: -
Last modified July 24, 2023: Merge pull request #167 from kube-logging/link-fixes-230714 (1dda279)