发布作者:
yss1994
百度收录:
正在检测是否收录...
作品采用:
《
署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
》许可协议授权
示例1
# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = netcat
a1.sources.r1.bind = hadoop000
a1.sources.r1.port = 44444
# Describe the sink
a1.sinks.k1.type = logger
# Use a channel which buffers events in memory
a1.channels.c1.type = memory
# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1文件监控
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F /home/hadoop/data/data.log
a1.sources.r1.shell = /bin/sh -c
# Describe the sink
a1.sinks.k1.type = logger
# Use a channel which buffers events in memory
a1.channels.c1.type = memory
# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1A服务器日志采集到B服务启
#1
a1.sources = r1
a1.sinks = k1
a1.channels = c1
a1.sources.r1.type = exec
a1.sources.r1.command = tail -f /home/hadoop/data/data.log
a1.sources.r1.shell = /bin/sh -c
a1.sinks.k1.type = avro
a1.sinks.k1.hostname = hadoop000
a1.sinks.k1.port = 44444
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
#2
a2.sources = r2
a2.sinks = k2
a2.channels = c2
a2.sources.r2.type = avro
a2.sources.r2.hostname = hadoop000
a2.sources.r2.port = 44444
a2.sinks.k2.type = logger
a2.sources.r2.channels = c2
a2.sinks.k2.channel = c2flume-ng agent
--conf $FLUME_HOME/conf
--conf-file $FLUME_HOME/conf/test-1.conf
--name a1
-Dflume.root.logger=INFO,console
—— 评论区 ——