Yup, exactly this. This level of complexity is best managed by using a single 
SandboxDecoder to do all of the work.

-r


On 01/21/2015 09:28 AM, Curt Micol wrote:
I think this would be beneficial for you
https://github.com/mozilla-services/heka/wiki/How-to-convert-a-PayloadRegex-MultiDecoder-to-a-SandboxDecoder-using-an-LPeg-Grammar

But the answer is to do it all in Lua.

On Wed, Jan 21, 2015 at 11:28 AM, Michael Giannini
<[email protected]> wrote:
> I want to scrub all log messages before sending them to match one of several
> PayloadRegexDecoder.  I think I can do it with chained MultiDecoders, but
> it's ugly:
>
> [ScrubAndDecode]
> type = "MultiDecoder"
> subs = ["SanitizeDecoder", "applog_decoder"]
> cascade_strategy = "all"
>
> [SanitizeDecoder]
> type = "SandboxDecoder"
> filename = "sanitize_decoder.lua"
>
> [applog_decoder]
> type = "MultiDecoder"
> subs = ["error_decoder", "other_decoder"]
> cascade_strategy = "first-wins"
>
> [error_decoder]
> type = "PayloadRegexDecoder"
> match_regex =  "blah"
>
> [other_decoder]
> type = "PayloadRegexDecoder"
> match_regex = 'blah'
>
> Anyone have another strategy?  Thanks
>
> _______________________________________________
> Heka mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/heka
>




_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to