On 05/18/2015 12:53 AM, Cristian Falcas wrote:
Hello,

Is it possible to connect a specific input to a specific output plugin
without message_matcher?
No. The message_matcher settings is how Heka decides which messages are handed 
to each filter and output. It's not even possible to register an output plugin 
without specifying a message_matcher.

Theoretically you could write a custom input plugin that bypasses the router 
and delivers messages directly to a specific output plugin, but that's almost 
certainly a bad idea.

One commonly used strategy to deliver all messages from a specific input to a 
specific output is to use a ScribbleDecoder on the input (possibly in concert 
with a MultiDecoder, since you're probably already doing some decoding) to set 
a field on every message coming through that input. Then you can set up an 
output that will match on that field. For instance, the following shows a 
TcpInput set up to receive protobuf encoded Heka messages, and a LogOutput set 
up to catch every message that comes in over the TcpInput:

[scribble]
type = "ScribbleDecoder"
  [scribble.message_fields]
  routing = "logoutput"

[ProtobufDecoder]

[multi]
type = "MultiDecoder"
subs = ["ProtobufDecoder", "ScribbleDecoder"]
cascade_strategy = "all"
log_sub_errors = true

[TcpInput]
address = "0.0.0.0:5565"
decoder = "multi"

[PayloadEncoder]

[LogOutput]
encoder = "PayloadEncoder"
message_matcher = "Fields[routing] == 'logoutput'"

Hope this helps,

-r

Thank you,
Cristian Falcas


_______________________________________________
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