参考文档: https://www.infoq.cn/article/NcSYj_2PQhBlqveuD1Kw
详细理论描述等可参考上述链接文章,这里描述具体的操作过程
官网: https://github.com/apache/rocketmq-exporter

前提:
已安装好prometheus和grafana
安装maven工具

1、安装编译rocketmq-exporter

git clone https://github.com/apache/rocketmq-exporter
cd rocketmq-exporter
mvn clean install

prometheus监控rocketMQ_第1张图片
mvn clean install过程报错:
Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (checkstyle-validation).....
解决方法:
修改pom.xml
prometheus监控rocketMQ_第2张图片
重新执行 mvn clean install
prometheus监控rocketMQ_第3张图片
2、启动exporter
prometheus监控rocketMQ_第4张图片
3、修改prometheus配置文件
prometheus监控rocketMQ
重启prometheus

4、grafana添加dashboard
从官网导入即可,编号为10477
prometheus监控rocketMQ_第5张图片