rocketmq_exporter是prometheus提供的用于监控rocketmq运行状态的exporter
系统 | 版本 |
---|---|
CentOS | 7.6.1810 (Core) |
CPU/内存 | 4核、8G |
git clone https://github.com/apache/rocketmq-exporter
cd rocketmq-exporter
mvn clean install
把软件包放置 /data/rocketmq_exporter/ 下
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
ID: 10447
参考
scrape_configs:
- job_name: mysqld
static_configs:
- targets: ['192.168.1.10:5557']
以上是centos上边部署rocketmq_exporter监控rocketmq的方法,有问题联系博主,后续也有其他插件