flume案例一:监听端口数据到flume日志中
作者:互联网
案例说明
数据源:netcat source
目的地:logger Sink
source:netcat,host,post
channel:基于内存的缓冲池 memory
sink:logger
配置文件
[root@node1 data]# vim portToLogger.conf
[root@node1 data]# pwd
/opt/data
[root@node1 data]# cat portToLogger.conf
# 给flume采集进程起一个别名 a1
# 定义flume进程中有几个source、sink、channel,以及每一个source的别名
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# 定义flume进程中source连接到数据源信息
a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444
a1.sinks.k1.type = logger
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
标签:flume,channels,source,端口,a1,sources,日志,c1 来源: https://www.cnblogs.com/jsqup/p/16554433.html