Created on 04-11-2016 06:35 AM - edited 09-16-2022 03:13 AM
Hi, Guys
I want to drop full record by searching a key using interceptor in flume is that possible to drop full record in flume?
For example in my log i have record like : (this record in pagenotfound.php) by searching pagenotfound.php this keyword i want to drop that full record is that possible ?
Please Help
Thanks in advance
Created 05-24-2016 02:22 AM
Created 04-11-2016 11:41 PM
Perhaps the Regex Filtering Interceptor is what you were looking for?
https://flume.apache.org/FlumeUserGuide.html#regex-filtering-interceptor
Created 04-11-2016 11:48 PM
Created 04-12-2016 10:49 AM
It would appear you can "chain" them by putting the interceptors that are desired in a list in the order you want them applied. I have never personally done it, so I can't say for sure. Hope this helps!
[1]"Flume supports chaining of interceptors. This is made possible through by specifying the list of interceptor builder class names in the configuration. Interceptors are specified as a whitespace separated list in the source configuration. The order in which the interceptors are specified is the order in which they are invoked. The list of events returned by one interceptor is passed to the next interceptor in the chain."
[1]https://flume.apache.org/FlumeUserGuide.html#flume-interceptors
Created 04-12-2016 09:54 PM
Hi Ben
Thanks a lot for replying, As you said i read that but i didn't get this thing
This is made possible through by specifying the list of interceptor builder class names in the configuration
as you said i want to define interceptors names like interceptor 1 and interceptor 2 this what you saying right.
Created 04-12-2016 10:11 PM
guessing like this: (assuming you want search-replace to be applied first, regex second)
....
agent.sources.localsource.interceptors = search-replace regex
agent.sources.localsource.interceptors.search-replace.type = search_replace
agent.sources.localsource.interceptors.regex.type = regex_filter
....
Created 05-23-2016 12:01 AM
Created 05-24-2016 02:22 AM
Created 05-24-2016 12:41 PM
Glad to Hear it!