环境搭建记录

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,

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值