flume安裝和配置

2021-10-06 19:44:44 字數 1499 閱讀 5493

tar -zxvf 檔名
2.在conf目錄下,建立乙個配置檔案並配置檔案,比如template.conf(名字不固定)

#配置agent a1的元件

#配置agent a1 的元件

a1.sources=r1

a1.channels=c1 (可以配置多個,以空格隔開,名字自己定)

a1.sinks=s1 (可以配置多個,以空格隔開,名字自己定)

#描述/配置a1的r1

a1.sources.r1.type=netcat (netcat表示通過指定埠來訪問)

a1.sources.r1.bind=0.0.0.0 (表示本機)

a1.sources.r1.port=44444 (指定的埠,此埠不固定,但是不要起衝突)

#描述a1的s1

a1.sinks.s1.type=logger (表示資料匯聚點的型別是logger日誌)

#描述a1的c1

a1.channels.c1.type=memory

a1.channels.c1.capacity=1000

a1.channels.c1.transactioncapacity=100

#位channel 繫結 source和sink

a1.sources.r1.channels=c1 (乙個source是可以對應多個通道的)

a1.sinks.s1.channel=c1 (乙個sink,只能對應乙個通道)

a1.sources=r1

a1.channels=c1

a1.sinks=s1

a1.sources.r1.type=netcat

a1.sources.r1.bind=0.0.0.0

a1.sources.r1.port=44444

a1.sinks.s1.type=logger

a1.channels.c1.type=memory

a1.channels.c1.capacity=1000

a1.channels.c1.transactioncapacity=100

a1.sources.r1.channels=c1

a1.sinks.s1.channel=c1

3.根據指定的配置檔案,來啟動flume進入flume的bin目錄執行

../bin/flume-ng agent -n a1 -c ../conf -f ../conf/template.conf -dflume.root.logger=info,console
4.通過nc來訪問(開另乙個視窗執行,不要關閉目前的視窗)

Flume 生產配置

1.flume安裝位置 10.96.183.54 home hadoop flume 1.7.0 2.配置文件 aoi.properties aoi.channels c1 aoi.sources r1 aoi.sinks k1 aoi.sources.r1.type spooldir aoi.so...

flume配置模板

root server 21 apache flume 1.6.0 bin cat test.properties 01 flume netcat test agent name a1 source netcat channel memory sink logger,local console 01...

Flume常用配置

flume常用配置4 taildir.source memory.channel hdfs.sink 以下配置基於版本apache flume 1.8.0 bin 我們假定已經對flume有一定了解,並且對flume 的各個元件有一定了解。我們演示乙個基本的 source 為 taildir源 ch...