首页 > Web开发 > 详细

Flume 的监控方式

时间:2020-03-14 01:01:08      阅读:107      评论:0      收藏:0      [点我收藏+]

因为Flume是基于Java编写的,所以已经提供了基于JMX的服务实现,内置了MBean。

唯一需要做的就是启动JMX服务,使用工具,或写代码,向JMX的monitor服务发送请求,获取其中的MBean。

一、基于JCONSOLE查看MBean

1、在conf/flume.env.sh中进行配置

export JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=5445 -Dcom.sun.man
agement.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

2、运行agent

3、打开jconsole工具,在远程连接那输入主机名及端口号

技术分享图片

 

 二、基于Json的监控

1、在conf/flume.env.sh中进行配置或者在启动命令中加入“-Dflume.monitoring.type=http -Dflume.monitoring.port=34545”

export JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=5445 -Dcom.sun.man
agement.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
-Dflume.monitoring.type=http -Dflume.monitoring.port=34545

2、启动agent

3、打开浏览器,登录34545端口查看Json代码

Flume 的监控方式

原文:https://www.cnblogs.com/yangxusun9/p/12490094.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!