Yes, this is a bit of a weak spot. The best option, currently, is to do all of your parsing in a SandboxDecoder, where you can put logic in to examine the container that each record came from and then choose the grammar that you use for parsing accordingly. You can't just invoke other decoders directly, but most of the heavy lifting in the decoders that Heka ships with is done in Lua modules, which are reusable across sandboxes, so wiring something up wouldn't be terribly difficult.

Another option we've been considering is to introduce a RoutingDecoder, which would be similar to the MultiDecoder except that it would allow you to delegate to subdecoders using the same message_matcher syntax that the router uses.

And yes, as Anton said, you can use MultiDecoder with first-wins cascading. That will work, but will be a bit slower because every decoder will be tried in succession until one finally succeeds. If you do go that route, you'd want the more commonly used decoders to be listed first.

-r


On 01/31/2015 07:45 AM, Halid Rian wrote:
Hi guys i would like to understand something about the DockerLogInput.
So in the description it says it will gather all the logs from the
running containers. That's the behaviour I'm expecting but my containers
are running all kind of services so how does heka know which decoder to
use?


_______________________________________________
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