配置kafka监控工具Eagle(现在叫efak)

1.先安装mysql,这一步就省略了

2.配置kafka的堆内存,至少2g

if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
 export KAFKA_HEAP_OPTS="-server -Xms2G -Xmx2G -XX:PermSize=128m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=8 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70"
 export JMX_PORT="9999"  #监控kafka运行情况的端口号
 #export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
fi

重启kafka

3.安装kafka的eagle

  1. EFAK下载
  2. 修改配置文件efak/conf/system-config.properties
  3. 将下边的配置修改
    efak.zk.cluster.alias=cluster1,cluster2
    cluster1.zk.list=tdn1:2181,tdn2:2181,tdn3:2181
    cluster2.zk.list=xdn10:2181,xdn11:2181,xdn12:2181
    
    
    
    //改为:注意,千万不能少了/kafka,因为我们在kafka中配置zookeeper的节点地址就是/kafka
    efak.zk.cluster.alias=cluster1
    cluster1.zk.list=hadoop102:2181,hadoop103:2181,hadoop104:2181/kafka
    
    
    
    //把offset存到zookeeper中这一行配置去掉
    cluster2.efak.offset.storage=zk
    
    
    
    # 配置 mysql 连接
    efak.driver=com.mysql.jdbc.Driver
    efak.url=jdbc:mysql://hadoop102:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
    efak.username=root
    efak.password=0000
    
    

    4.添加环境变量

    

# kafkaEFAK
export KE_HOME=/opt/module/efak
export PATH=$PATH:$KE_HOME/bin

 5.启动即可

[hyj@hadoop102 efak]$ bin/ke.sh start

你可能感兴趣的:(中间件,java,kafka,java,分布式)