监控rocketmq 常用方法
一、mqcloud(https://github.com/sohutv/mqcloud/)
sohu出的集客户端SDK,运维,监控,预警等功能的RocketMQ企业级一站式服务平台
使用java开发,功能比较多,对集群数量较多的环境支持比较好
二、RocketmqExporter(https://github.com/apache/rocketmq-exporter.git)
官方源码,使用java开发,支持集成到prometheus
三、rocketmq-6(https://github.com/hepyu/RocketmqExporter)
golang实现的生产可用rocketmq-exporter
个人比较喜欢这个,但因为作者偷了点懒,需要从rocketmq-console的http请求获取数据。也就是说RocketmqExporter必须依赖rocketmq-console
四、rocketmq-console-ng(https://github.com/apache/rocketmq-externals)
一直有在用,没想到还可以实现监控报警(参考https://blog.csdn.net/luanlouis/article/details/88078657)
mqadmin常用参数
#创建更新主题(updateTopic) ./mqadmin updateTopic -b 127.0.0.1:10911 -t TopicCmd #删除主题(deleteTopic) ./mqadmin deleteTopic -n 127.0.0.1:9876 -c 127.0.0.1:10911 -t TopicCmd #创建更新消费组(updateSubGroup) ./mqadmin updateSubGroup -n 127.0.0.1:9876 -b 127.0.0.1:10911 -g GroupTest #删除消费组(deleteSubGroup) ./mqadmin deleteSubGroup -n 127.0.0.1:9876 -b 127.0.0.1:10911 -g GroupTest #主题队列信息(topicStatus) ./mqadmin topicStatus -n 127.0.0.1:9876 -t TopicTest #主题路由信息(topicRoute) ./mqadmin topicRoute -n 127.0.0.1:9876 -t TopicTest #主题列表(topicList) ./mqadmin topicList -n 127.0.0.1:9876 #Broker节点信息(brokerStatus) ./mqadmin brokerStatus -n 127.0.0.1:9876 -b 127.0.0.1:10911 #通过KEY查询消息(queryMsgByKey) ./mqadmin queryMsgByKey -n 127.0.0.1:9876 -k 2000000 -t TopicTest #通过KEY查询消息(queryMsgByKey) ./mqadmin queryMsgByKey -n 127.0.0.1:9876 -k 2000000 -t TopicTest #打印消息(printMsg) ./mqadmin printMsg -n 127.0.0.1:9876 -t TopicTest -b 2019-07-26#07:50:00:000 -e 2019-07-26#09:00:00:000 #查看消费状态(brokerConsumeStats) ./mqadmin brokerConsumeStats -b 127.0.0.1:10911 #集群的节点信息(clusterList) ./mqadmin clusterList -n 127.0.0.1:9876 #总体的消费的状态信息(statsAll) ./mqadmin statsAll -n 127.0.0.1:9876 #查看消费组下的消费者信息(consumerConnection) ./mqadmin consumerConnection -n 127.0.0.1:9876 -g group_name_1 #消费进度信息(consumerProgress) ./mqadmin consumerProgress -n 127.0.0.1:9876 #消费进度信息(consumerProgress) ./mqadmin consumerProgress -n 127.0.0.1:9876 #消息队列负载情况(allocateMQ) ./mqadmin allocateMQ -t TopicTest -i 127.0.0.1 -n 127.0.0.1:9876 #测试Broker接收消息的性能(sendMsgStatus) ./mqadmin sendMsgStatus -n 127.0.0.1:9876 -b broker-a -c 3 #测试Broker接收消息的性能(sendMsgStatus) ./mqadmin sendMsgStatus -n 127.0.0.1:9876 -b broker-a -c 3 #查看Broker配置信息(getBrokerConfig) ./mqadmin getBrokerConfig -b 127.0.0.1:10911
引用:https://mp.weixin.qq.com/s/CyYdss6kFlo9qRuGfM_OlA