FlumeNG——收集tomcat日志-海量数据处理-hive数据仓库

时间:2021-04-26 10:20:49
【文件属性】:
文件名称:FlumeNG——收集tomcat日志-海量数据处理-hive数据仓库
文件大小:2.57MB
文件格式:PPT
更新时间:2021-04-26 10:20:49
大数据 数仓 hive hadoop 海量数据处理 FlumeNG——收集tomcat日志 例子场景描述:将tomcat的日志收集到指定的目录,tomcat 安装在/opt/tomcat, 日志存放在var/log/data agent1.sources = source1 agent1.sinks = sink1 agent1.channels = channel1  #Describe/configure source1 agent1.sources.source1.type = exec agent1.sources.source1.command = tail -n +0 -F /opt/tomcat/logs/ catalina.out agent1.sources.source1.channels = channel1 # Describe sink1 agent1.sinks.sink1.type = file_roll agent1.sinks.sink1.sink.directory=/var/log/data # Use a channel which buffers events in memory agent1.channels.channel1.type = file agent1.channels.channel1.checkpointDir=/var/checkpoint agent1.channels.channel1.dataDirs=/var/tmp agent1.channels.channel1.capacity = 1000 agent1.channels.channel1.transactionCapactiy = 100  # Bind the source and sink to the channel agent1.sources.source1.channels = channel1 agent1.sinks.sink1.channel = channel1 运行agent  1bin/flume-ng agent --conf conf --conf-file tomcat.conf --name agent1 -Dflume.root.logger=INFO,console agent自动会将日志收集到指定的var/log/data

网友评论