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:$PATH


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.sh

vi flume-env.sh

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

vi  exec.conf

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 = c2

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

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/null

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

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

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(回滚的数量)
 

猜你喜欢

转载自my.oschina.net/u/2510243/blog/1796759