1,flume tail:
baidudeMacBook-Pro:conf shaokai$ cat exec_tail.conf
#下面的agent1是代理名称
agent1.sources = s1
agent1.channels = c1
agent1.sinks = k1
#配置数据源source
agent1.sources.s1.type = exec
agent1.sources.s1.channels = c1
agent1.sources.s1.command = tail -f /Users/baidu/Library/Caches/IntelliJIdea14/tomcat/Unnamed_watt-fengmai/logs/watt.log
agent1.sources.s1.batchSize=10
agent1.sources.s1.batchTimeout=1000
# 配置内存 channel
agent1.channels.c1.type = memory
agent1.channels.c1.capacity = 50000
agent1.channels.c1.transactionCapacity = 10000
# 配置 sinks
agent1.sinks.k1.channel = c1
agent1.sinks.k1.type = file_roll
agent1.sinks.k1.sink.directory = /tmp/flume
#默认值为30,即每30秒生成一个文件
#为0时表示只有一个文件存放数据
agent1.sinks.k1.sink.rollInterval =600
#设置的越大吞吐能力越好,延时也越大
agent1.sinks.k1.sink.batchSize=10
baidudeMacBook-Pro:conf shaokai$
baidudeMacBook-Pro:apache-flume-1.7.0-bin shaokai$ nohup ./bin/flume-ng agent -n agent1 -c conf -f conf/exec_tail.conf -Dflume.root.logger=INFO,console
appending output to nohup.out
http://www.aboutyun.com/thread-8917-1-1.html
2,