天天看點

flume配置執行個體(五)多資料源聚合模式

一、軟體

參考前例

二、要求

資料源2個(模拟搜集多個伺服器日志),1或2個接收。

三、配置

第一個資料源配置檔案:juhesource1.conf

# example.conf: A single-node Flume configuration

# Name the components on this agent

a1.sources = r1

a1.sinks = k1

a1.channels = c1

# Describe/configure the source

a1.sources.r1.type = TAILDIR

a1.sources.r1.filegroups = f1

a1.sources.r1.filegroups.f1 = /root/logs/boot3.log

a1.sources.r1.positionFile = /home/opt/flume/logs/positiong1.json  

# Describe the sink

a1.sinks.k1.type = avro

a1.sinks.k1.hostname = dellbook

a1.sinks.k1.port = 41415

# Use a channel which buffers events in memory

a1.channels.c1.type = memory

a1.channels.c1.capacity = 1000

a1.channels.c1.transactionCapacity = 100

# Bind the source an