安装JmxTrans
cd /share
wget https://repo1.maven.org/maven2/org/jmxtrans/jmxtrans/270/jmxtrans-270-dist.tar.gz
tar -zxvf jmxtrans-270-dist.tar.gz -C ~/modules/
启动JMX代理
cd /home/vagrant/modules/jmxtrans-270/
# 脚本赋权
sudo chmod +x ./bin/jmxtrans.sh
# 加载所有*.json
JAR_FILE=./lib/jmxtrans-all.jar ./bin/jmxtrans.sh start
# 指定加载某类型的json
JAR_FILE=./lib/jmxtrans-all.jar ./bin/jmxtrans.sh start ./bin/zk*-jmxtrans.json
# 指定文件方式启动
bin/jmxtrans.sh start ./bin/kafka_jvm.json
bin/jmxtrans.sh stop
bin/jmxtrans.sh status