rocketmq_exporter部署

唐繁
2023-12-01

简单介绍

rocketmq_exporter是prometheus提供的用于监控rocketmq运行状态的exporter


环境

系统版本
CentOS7.6.1810 (Core)
CPU/内存4核、8G

软件包下载

CSDN(jar包)

rocketmq_exporter

gitlab(自己mvn)

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

部署

把软件包放置 /data/rocketmq_exporter/ 下

启动

配置为系统服务

rocketmq_exporter.service

cat <<EOF>>  /usr/lib/systemd/system/rocketmq_exporter.service
[Unit]
Description=mysqld_exporter


[Service]
[Unit]
Description=rocketmq_exporter
After=network.target

[Service]
Type=simple
User=root
ExecStart=/opt/jdk/bin/java -jar /data/rocketmq_exporter/rocketmq-exporter-0.0.2-SNAPSHOT.jar --rocketmq.config.namesrvAddr=192.168.1.10:9876
Restart=always

[Install]
WantedBy=multi-user.target
EOF

启动

systemctl daemon-reload
systemctl enable rocketmq_exporter --now
systemctl status rocketmq_exporter
systemctl stop rocketmq_exporter

Grafana监控配置

ID: 10447

prometheus.yml修改

参考

scrape_configs:
  - job_name: mysqld
      static_configs:
      - targets: ['192.168.1.10:5557']

prometheus监控&插件方案

prometheus部署

总结

以上是centos上边部署rocketmq_exporter监控rocketmq的方法,有问题联系博主,后续也有其他插件

 类似资料: