• KAFKA基础(十四): Kafka监控


    1 Kafka Eagle

    1)修改kafka启动命令

    if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
        export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
    fi

    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"
        #export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
    fi

    注意:修改之后在启动Kafka之前要分发之其他节点

    2上传压缩包kafka-eagle-bin-1.4.5.tar.gz到集群/opt/software目录

    3解压到本地

    [atguigu@hadoop102 software]$ tar -zxvf kafka-eagle-bin-1.4.5.tar.gz

    4进入刚才解压的目录

    [atguigu@hadoop102 kafka-eagle-bin-1.4.5]$ ll
    总用量 82932
    -rw-rw-r--. 1 atguigu atguigu 84920710 8月  13 23:00 kafka-eagle-web-1.4.5-bin.tar.gz

    5kafka-eagle-web-1.3.7-bin.tar.gz解压至/opt/module

    [atguigu@hadoop102 kafka-eagle-bin-1.4.5]$ tar -zxvf kafka-eagle-web-1.4.5-bin.tar.gz -C /opt/module/

    6修改名称

    [atguigu@hadoop102 module]$ mv kafka-eagle-web-1.4.5/ eagle

    7给启动文件执行权限

    [atguigu@hadoop102 eagle]$ cd bin/
    [atguigu@hadoop102 bin]$ ll
    总用量 12
    -rw-r--r--. 1 atguigu atguigu 1848 8月  22 2017 ke.bat
    -rw-r--r--. 1 atguigu atguigu 7190 7月  30 20:12 ke.sh
    [atguigu@hadoop102 bin]$ chmod 777 ke.sh

    8修改配置文件 conf/system-config.properties

    ######################################
    # multi zookeeper&kafka cluster list
    ######################################
    kafka.eagle.zk.cluster.alias=cluster1
    cluster1.zk.list=hadoop102:2181,hadoop103:2181,hadoop104:2181
    
    ######################################
    # kafka offset storage
    ######################################
    cluster1.kafka.eagle.offset.storage=kafka
    
    ######################################
    # enable kafka metrics
    ######################################
    kafka.eagle.metrics.charts=true
    kafka.eagle.sql.fix.error=false
    
    ######################################
    # kafka jdbc driver address
    ######################################
    kafka.eagle.driver=com.mysql.jdbc.Driver
    kafka.eagle.url=jdbc:mysql://hadoop102:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
    kafka.eagle.username=root
    kafka.eagle.password=123456

    9添加环境变量

    export KE_HOME=/opt/module/eagle
    export PATH=$PATH:$KE_HOME/bin

    注意:source /etc/profile

    10启动

     [atguigu@hadoop102 eagle]$ bin/ke.sh start
    ... ...
    ... ...
    *******************************************************************
    * Kafka Eagle Service has started success.
    * Welcome, Now you can visit 'http://192.168.202.102:8048/ke'
    * Account:admin ,Password:123456
    *******************************************************************
    * <Usage> ke.sh [start|status|stop|restart|stats] </Usage>
    * <Usage> https://www.kafka-eagle.org/ </Usage>
    *******************************************************************
    [atguigu@hadoop102 eagle]$

    注意:启动之前需要先启动ZK以及KAFKA

    11登录页面查看监控数据

    http://192.168.202.102:8048/ke

    本文来自博客园,作者:秋华,转载请注明原文链接:https://www.cnblogs.com/qiu-hua/p/15224713.html

  • 相关阅读:
    【转】xcode的模拟器位置
    [汇] 立即寻址,直接寻址,间接寻址
    [汇] iOS Crash相关(2)
    [转] time profile 使用详解
    [汇] iOS Crash相关(1)
    [转] Xcode 高级调试技巧
    [汇] iOS高级调试汇总
    [转]iOS动画专题·UIView二维形变动画与CAAnimation核心动画(transform动画,基础,关键帧,组动画,路径动画,贝塞尔曲线)
    [SVN]TortoiseSVN工具培训1─为什么要用SVN?
    团队管理_第一期干部训练营心得
  • 原文地址:https://www.cnblogs.com/qiu-hua/p/15224713.html
Copyright © 2020-2023  润新知