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.

    1. Name mem
    2. Tag mem.local
    3. [OUTPUT]
    4. Name stdout
    5. Match *
    6. [FILTER]
    7. Name record_modifier
    8. Record hostname ${HOSTNAME}
    9. Record product Awesome_Tool

    You can also run the filter from command line.

    1. $ 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.

    1. Name mem
    2. Tag mem.local
    3. [OUTPUT]
    4. Name stdout
    5. Match *
    6. [FILTER]
    7. Name record_modifier
    8. Match *
    9. Remove_key Swap.total
    10. Remove_key Swap.free

    The output will be

    The following configuration file is to remain ‘Mem.*‘ fields.

    1. [INPUT]
    2. Name mem
    3. Tag mem.local
    4. [OUTPUT]
    5. Name stdout
    6. Match *
    7. [FILTER]
    8. Name record_modifier
    9. Match *
    10. Whitelist_key Mem.total
    11. Whitelist_key Mem.used

    You can also run the filter from command line.

    1. $ 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 '*'