Apache Kafka监控之KafkaOffsetMonitor

1、下载

github官网下载:
KafkaOffsetMonitor 不推荐,因为KafkaOffsetMonitor中有些资源文件(css,js)是google的,没有经过FQ是访问不到的
百度云下载(网速快):
KafkaOffsetMonitor 推荐
说明:百度云下载为修改版本

2、安装

linux环境:将下载好的KafkaOffsetMonitor-assembly-0.2.0.jar 拷贝到自己的目录下,比如:/soft/kafkamonitor

$ cd /soft/kafkamonitor/ --切换到jar所在的目录

$ vi kafka_monitor_run.sh

编写启动脚本:

java -cp KafkaOffsetMonitor-assembly-0.2.0.jar\
com.quantifind.kafka.offsetapp.OffsetGetterWeb\
--zk zk-1:2181,zk-2:2181,zk-3:2181\
--port 8080\
--refresh 10.minutes\
--retain 1.day

各个参数的含义:

1 zk the ZooKeeper hosts
2 port on what port will the app be available
3 refresh how often should the app refresh and store a point in the DB
4 retain how long should points be kept in the DB
5 dbName where to store the history (default 'offsetapp')

3、运行

$ sh kafka_monitor_run.sh 


 OK!这样将会在8080端口上访问该监控:,如下图:

注:此文借鉴了别人的博客,写的很棒,自己完成这项工作也是学习了别人的博客,只是在这儿通过更简洁的方式记录了自己的安装过程,如有雷同纯属巧合,

     在此推荐我借鉴的博客 http://blog.csdn.net/lizhitao/article/details/27199863

 

posted @ 2015-09-24 12:03  琪阿哥  阅读(316)  评论(0编辑  收藏  举报