做kafka相关项目,需要用到监控的东东,找到了两个方法

第一个:

http://quantifind.com/KafkaOffsetMonitor/

非常容易上手,效果也直观,可以显示各个topic consumer的offset broker存储log的长度

不过发现一个bug就是当 consumer没有commit offset的时候 这个topic就不会显示它的消费情况

使用方法就是直接启动一个jar包 配好zookeeper就好了

第二个比较直接:就是kafka直接提供jmx接口进行监控

首先需要把jmx打开 方法参照了:

http://blogs.impetus.com/big_data/big_data_technologies/kafka-monitoring-using-jmx-jmxtrans.do

Step-I: Setup JMXTrans on all the machines of the Kafka cluster as done on the Storm cluster in the previous post.
Step-II: In the kafka setup, edit “kafka-run-class.sh” script file by adding the following line to it:
KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false "
Step-III: Also, edit the “kafka-server-start.sh” script file present in the kafka setup to set the JMX port to 9999 by adding the following line:
export JMX_PORT=${JMX_PORT:-9999}                                    
apache的wiki推荐了四种jmx reporter
本人实践中采用了jmxtrans 就是将jmx的信息以json格式汇报出来 比较好方便集成到现有的监控系统当中

最新文章

  1. 简单代码在ABAP中实现声音的播放
  2. 大家一起和snailren学java-(13)字符串
  3. PHP中array_chunk的用法
  4. [转帖] CvMat,Mat和IplImage之间的转化和拷贝
  5. ArcEngine开发异常:无当前记录
  6. windows 测试数据库的连接状况-udl方法
  7. iOS开发-GCD和后台处理
  8. ichartjs
  9. Struts2中的验证框架
  10. 基于Flink秒级计算时CPU监控图表数据中断问题
  11. python 09
  12. appium---第二个脚本,定位页面元素
  13. .NET WebService 入门
  14. SpringBoot整合MyBatis(XML)
  15. Flask系列06--(中间件)Flask的特殊装饰器 before_request,after_request, errorhandler
  16. IDEA2018.1安装配置文档
  17. 推荐一些socket工具,TCP、UDP调试、抓包工具
  18. Oracle数据库order by排序查询分页比不分页还慢问题解决办法
  19. e668. 在一组像素中创建缓冲图像
  20. Qt Pro文件与Qt模块启用

热门文章

  1. codeforces --- 115A
  2. robotium源码方法备注---clicker.java
  3. Longest Consecutive Sequence——Leetcode
  4. Tree2cycle
  5. Redis教程03——Redis 发布/订阅(Pub/Sub)
  6. 【转载】nginx 并发数问题思考:worker_connections,worker_processes与 max clients
  7. Hashtable映射数据库字段
  8. .net对js和css、img剥离项目进行压缩优化、cdn加速
  9. DevExpress LookUpEdit 下拉框基本操作
  10. 【转】Android通过Wifi来调试你的应用