Configuring a multi agent flow
To setup a multi-tier flow, you need to have an avro/thrift sink of first hoppointing to avro/thrift source of the next hop. This will result in the firstFlume agent forwarding events to the next Flume agent. For example, if you areperiodically sending files (1 file per event) using avro client to a localFlume agent, then this local agent can forward it to another agent that has themounted for storage.
Weblog agent config:
- # list sources, sinks and channels in the agent
- agent_foo.sources = avro-AppSrv-source
- agent_foo.sinks = avro-forward-sink
- agent_foo.channels = file-channel
- # define the flow
- agent_foo.sources.avro-AppSrv-source.channels = file-channel
- agent_foo.sinks.avro-forward-sink.channel = file-channel
- # avro sink properties
- agent_foo.sinks.avro-forward-sink.type = avro
- agent_foo.sinks.avro-forward-sink.hostname = 10.1.1.100
- agent_foo.sinks.avro-forward-sink.port = 10000
- # configure other pieces
- #...
HDFS agent config:
- # list sources, sinks and channels in the agent
- agent_foo.sources = avro-collection-source
- agent_foo.sinks = hdfs-sink
- agent_foo.channels = mem-channel
- # define the flow
- agent_foo.sources.avro-collection-source.channels = mem-channel
- agent_foo.sinks.hdfs-sink.channel = mem-channel
- # avro source properties
- agent_foo.sources.avro-collection-source.type = avro
- agent_foo.sources.avro-collection-source.bind = 10.1.1.100
- agent_foo.sources.avro-collection-source.port = 10000
- # configure other pieces
- #...
Here we link the avro-forward-sink from the weblog agent to theavro-collection-source of the hdfs agent. This will result in the events comingfrom the external appserver source eventually getting stored in HDFS.