flume 随记

#jdk-8u111-linux-x64
export JAVA_HOME=/usr/local/jdk1.8.0_111
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATHlinux


cp ${FLUME_HOME}/conf/flume-conf.properties.template ${FLUME_HOME}/conf/exec.conf
cp ${FLUME_HOME}/conf/flume-env.sh.template ${FLUME_HOME}/conf/flume-env.shapache

vi flume-env.shoop

export JAVA_HOME=/usr/local/jdk1.8.0_111hadoop

vi  exec.confci

a2.sources = r2
a2.sinks = k2
a2.channels = c2
# Describe/configure the source
a2.sources.r2.type = exec
a2.sources.r2.channels = c2
a2.sources.r2.command=tail -n +0 -F /usr/local/hadoop/flume/test.log
# Describe the sink
a2.sinks.k2.type = logger
# Use a channel which buffers events in memory
a2.channels.c2.type = memory
a2.channels.c2.capacity = 1000
a2.channels.c2.transactionCapacity = 100
# Bind the source and sink to the channel
a2.sources.r2.channels = c2
a2.sinks.k2.channel = c2kafka

#apache-flume-1.7.0-bin
export FLUME_HOME=/root/flume
export PATH=${FLUME_HOME}/bin:$PATHit

flume-ng agent --conf /root/flume/conf/ -f /root/flume/conf/exec.conf -Dflume.root.logger=DEBUG,console -n a2
#http 监控
nohup flume-ng  agent --conf conf --conf-file /data/apache-flume-1.6.0-cdh5.10.0-bin/conf/dirfile_to_kafa_conf.properties --name agent -Dflume.monitoring.type=http -Dflume.monitoring.port=86668  & >/dev/nullio

#kafka_2.11-0.9.0.1
export KAFKA_HOME=/root/kafka
export PATH=${KAFKA_HOME}/bin:$PATHconsole

http监控参数:
1,SOURCE
OpenConnectionCount (打开的链接数)
Type (组件类型)
AppendBatchAcceptedCount (追加到channel中的批数量)
AppendBatchReceivedCount (source端刚刚追加的批数量)
EventAcceptedCount (成功放入channel的event数量)
AppendReceivedCount (source追加收到的数量)
StartTime (组件开始时间)
StopTime (组件中止时间)
EventReceivedCount (source端成功收到的event数量)
AppendAcceptedCount (追加到channel的数量)event

2,CHANNEL
EventPutSuccessCount (成功放入channel的event数量)
ChannelFillPercentage (通道使用比例)
Type (组件类型)
EventPutAttemptCount (尝试放入将event放入channel的次数)
ChannelSize (channel中的event数量)
StartTime (组件开始时间)
StopTime (组件中止时间)
EventTakeSuccessCount (从channel中成功取走的event数量)
ChannelCapacity (通道容量)
EventTakeAttemptCount (尝试从channel中取走event的次数)

3,SINK BatchCompleteCount (完成的批数量)、 ConnectionFailedCount (链接失败数)、 EventDrainAttemptCount (尝试提交的event数量)、 ConnectionCreatedCount (建立链接数)、 Type (组件类型)、 BatchEmptyCount (批量取空的数量)、 ConnectionClosedCount (关闭链接数量)、 EventDrainSuccessCount (成功发送event的数量)、 StartTime (组件开始时间)、 StopTime (组件中止时间)、 BatchUnderflowCount (正处于批量处理的batch数) RollbackCount(回滚的数量)  

相关文章
相关标签/搜索