I am learning flume.While i am trying to read the log file from my system .I used the following code ..downloaded from internet.
agent.sources = tailSrc
agent.channels = memoryChannel
agent.sinks = hdfsSink
agent.sources.tailSrc.type = exec
agent.sources.tailSrc.command = tail -f /home/kumar/hadoop-2.5.1/logs/hadoop-kumar-namenode-admin.log
agent.sources.tailSrc.channels = memoryChannel
agent.sinks.hdfsSink.type = hdfs
agent.sinks.hdfsSink.hdfs.path = hdfs://localhost:50000/flume
agent.sinks.hdfsSink.channel = memoryChannel
agent.channels.memoryChannel.type = memory
agent.channels.memoryChannel.capacity = 100
Here in the above code i don't understand what is mean tailSrc.commands.I know source is configures within the agent and get event(data) from external source.
in your code agent.sources.tailSrc.command is exec-source.just refer the link.
https://flume.apache.org/FlumeUserGuide.html#exec-source
tail is a unix command,By default, tail will output the last 10 lines of its input. you can give any command or loops instead of tail.simple these commands executes and give the output as a source to flume agent.