A nest filter reshapes Fluent Bit records by grouping matching attributes under a nested object or promoting nested elements to their parent. Use operation nest to demote attributes and lift to promote them. section 7.3
Configure the transformation around the target attributes and their destination:
- Select attributes with wildcard; the wildcard is supported only as a postfix. section 7.3.1
- Set nest_under to name the parent object receiving demoted attributes. section 7.3.1
- Use remove_prefix to eliminate redundant common prefixes while grouping related attributes. section 7.3.1
- Set nested_under to identify the object whose children should be promoted, and add_prefix when lifted elements need a prefix. section 7.3.1
Group or flatten record attributes
Use demotion to group Kubernetes metadata or other related attributes beneath a named object. Use promotion to flatten an unnecessarily complex hierarchy; the example also demonstrates promoting only path child elements. Console output can be parsed with a JSON beautifier. section 7.3.1
fluent-bit -c fluentbit/nest-example.conf.
Run the supplied Fluent Bit configuration to inspect nest and lift behavior with a dummy-input-created JSON payload. section 7.3.1
