Skip to content

Commit

Permalink
filter: Add new nest filter
Browse files Browse the repository at this point in the history
This adds a filter, called 'nest'. It allows you to,

 - Nest a set of key-values pairs under a new key
 - Lift a set of key-value pairs up to the top level

Signed-off-by: Michiel Kalkman <mkalkman@shelde.com>
  • Loading branch information
Michiel Kalkman committed May 9, 2018
1 parent e12a13f commit 89183b8
Show file tree
Hide file tree
Showing 8 changed files with 644 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ option(FLB_FILTER_PARSER "Enable parser filter" Yes)
option(FLB_FILTER_KUBERNETES "Enable kubernetes filter" Yes)
option(FLB_FILTER_THROTTLE "Enable throttle filter" Yes)
option(FLB_FILTER_RECORD_MODIFIER "Enable record_modifier filter" Yes)
option(FLB_FILTER_NEST "Enable nest filter" Yes)

# Enable all features
if(FLB_ALL)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ $ bin/fluent-bit -i cpu -o stdout
|--------------------|------------|---------------------------------------------------------------------------------|
| Record Modifier | record_modifier | Append/Remove key-value pair |
| Grep | grep | Match or exclude specific records by patterns |
| Nest | nest | Nest specific records by patterns |
| Kubernetes | kubernetes | Enrich logs with Kubernetes Metadata |
| Stdout | stdout | Print records to the standard output interface |
| Parser | parser | Parse records |
Expand Down
1 change: 1 addition & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ if(FLB_REGEX)
REGISTER_FILTER_PLUGIN("filter_parser")
endif()
REGISTER_FILTER_PLUGIN("filter_record_modifier")
REGISTER_FILTER_PLUGIN("filter_nest")

# Register external input and output plugins
if(EXT_IN_PLUGINS)
Expand Down
4 changes: 4 additions & 0 deletions plugins/filter_nest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(src
nest.c)

FLB_PLUGIN(filter_nest "${src}" "")
Loading

0 comments on commit 89183b8

Please sign in to comment.