Database Reference
In-Depth Information
Regular Expression Filter Interceptor
The Regular Expression Filter interceptor applies a regular expression to
the body of the Event, assuming that it is a string. If the regular expression
matches, the event is either preserved or dropped depending on the
excludeEvents property. If the property is set to true , events matching
the regular expression are dropped. Otherwise, only events matching the
regular expression are preserved. The regular expression itself is defined by
the regex property:
agent_1.sources.source-1.interceptors.i-1.type=regex_filter
agent_1.sources.source-1.interceptors.i-1.regex=.*
agent_1.sources.source-1.interceptors.i-1.excludeEvents=false
This interceptor can be used to set up different paths for different types
of events. After they are on different paths, they can be easily processed
without having to introduce an if-else ladder in the processing code.
Integrating Custom Flume Components
As described in the previous sections, many of the components in Flume
can be replaced with custom implementations. These are usually developed
outsideoftheFlumesourcecode,andtwointegrationmethodsaresupplied.
Plug-in Integration
The preferred method of integration is through Flume's plug-in facility. To
use this method, create a directory called plugin.d in the Flume home
directory. Each plug-in that should be included is placed in a subdirectory
inside of plugin.d . For example, to include the examples from this topic,
the plugin.d structure would look like this:
plugin.d/
plugin.d/wiley-plugin/
plugin.d/wiley-plugin/lib/wiley-chapter-4.jar
If further dependencies are required, they can be placed in the libext
subdirectory of the plug-in or built into the included jar directly. Native
libraries are placed in the native subdirectory. When the Flume agent
starts, it scans the plug-in directory and adds whatever jar files it finds there
to the classpath.
Search WWH ::




Custom Search