flume日誌採集 到kafka ,使用斷點續傳

2021-09-23 14:25:46 字數 1555 閱讀 5576

使用斷點續傳所需要的jar,可直接替換flume/bin目錄下的flume-taildir-source-1.9.0.jar

#agent

custominterceptor.sources=r1

custominterceptor.channels=c1

custominterceptor.sinks=s1

#source

#custominterceptor.sources.r1.type=exec

#custominterceptor.sources.r1.command=tail -f /opt/module/logs/log/web.log

custominterceptor.sources.r1.type = taildir

#記錄每次讀取的檔案位置,斷點續傳用

custominterceptor.sources.r1.positionfile = /opt/module/logs/taildir_position.json  

custominterceptor.sources.r1.filegroups=f1

custominterceptor.sources.r1.filegroups.f1=/opt/module/logs/log/web.log

custominterceptor.sources.r1.fileheader=true

#channe1

custominterceptor.channels.c1.type=memory

custominterceptor.channels.c1.capacity=1000

custominterceptor.channels.c1.transactioncapacity=100

#sink

#設定kafka接收器

custominterceptor.sinks.s1.type= org.apache.flume.sink.kafka.kafkasink

#設定kafka的broker位址和埠號

custominterceptor.sinks.s1.brokerlist=192.168.0.20:9092

#設定kafka的topic

custominterceptor.sinks.s1.topic=first5

#設定序列化方式

從flume到kafka,日誌收集

實時日誌分析 本篇文章主要測試 從flume到kafka的日誌收集,storm日誌分析,學習中!flume 配置檔案 collector collector.sources cs collector.sinks ck hbasesink collector.channels cc hbasechan...

flume實時收集日誌到kafka

flume實時收集日誌 kafka版本0.8.2 1.版本apache flume 1.7.0 bin.tar.gz 解壓後conf 目錄下配置以.conf結尾的檔案如 flume properties.conf 2.配置檔案資訊 sources 資料來源每增加乙個新增即可 a1.sources r...

flume配置採集日誌

上傳dir hdfs.conf 到flume的conf目錄下 定義三大元件的名稱 ag1.sources source1 ag1.sinks sink1 ag1.channels channel1 配置source元件 ag1.sources.source1.type spooldir ag1.so...