Record Modifier
The plugin supports the following configuration parameters: Remove_key and Whitelist_key are exclusive.
Getting Started
In order to start filtering records, you can run the filter from the command line or through the configuration file.
This is a sample in_mem record to filter.
Name mem
Tag mem.local
[OUTPUT]
Name stdout
Match *
[FILTER]
Name record_modifier
Record hostname ${HOSTNAME}
Record product Awesome_Tool
You can also run the filter from command line.
$ fluent-bit -i mem -o stdout -F record_modifier -p 'Record=hostname ${HOSTNAME}' -p 'Record=product Awesome_Tool' -m '*'
The output will be
The following configuration file is to remove ‘Swap.*‘ fields.
Name mem
Tag mem.local
[OUTPUT]
Name stdout
Match *
[FILTER]
Name record_modifier
Match *
Remove_key Swap.total
Remove_key Swap.free
The output will be
The following configuration file is to remain ‘Mem.*‘ fields.
[INPUT]
Name mem
Tag mem.local
[OUTPUT]
Name stdout
Match *
[FILTER]
Name record_modifier
Match *
Whitelist_key Mem.total
Whitelist_key Mem.used
You can also run the filter from command line.
$ fluent-bit -i mem -o stdout -F record_modifier -p 'Whitelist_key=Mem.total' -p 'Whitelist_key=Mem.free' -p 'Whitelist_key=Mem.used' -m '*'