//之前一直用的是memory缓存

flume---2中channel file和memory 随笔 第1张 

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

 

channels通道类型为文件形式

[root@linux05 conf]# vim filechannel.conf 

 

a1.sources=r1
a1.channels=c1
a1.sinks=k1

a1.sources.r1.type=spooldir
a1.sources.r1.spoolDir=/flume
a1.sources.r1.fileSuffix=.fuck

a1.channels.c1.type = file
a1.channels.c1.checkpointDir = /flumelogs/checkpoint
a1.channels.c1.dataDir = /flumelogs/data

a1.sinks.k1.type=logger

a1.sinks.k1.channel=c1
a1.sources.r1.channels=c1
*********************************************************************

[root@linux05 conf]# flume-ng agent -c . -f filechannel.conf -n a1 -Dflume.root.logger=info,console

flume---2中channel file和memory 随笔 第2张

//查看监控结果

flume---2中channel file和memory 随笔 第3张

 

flume---2中channel file和memory 随笔 第4张

 

  

 

 

 

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄