安装NewRelic的MySQL插件
Jan 21, 2014
下载解压 newrelic_mysql_plugin
wget https://rpm.newrelic.com/plugins/52/ccc77b365b95fb4ca973aa29843616fd
tar -xvf newrelic_mysql_plugin-1.2.0.tar.gz
复制到/usr/local/ 目录下
sudo cp -rf newrelic_mysql_plugin-1.2.0 /usr/local/newrelic-mysql
cd /usr/local/newrelic-mysql
改配置
cp config/template_mysql.instance.json config/mysql.instance.json
cp config/template_newrelic.properties config/newrelic.properties
添加授权码(YOUR LICENSE KEY)
vi config/newrelic.properties
licenseKey=xxxxxxxxxxxxxxxxxxxxxxxxxx
配置mysql的参数
vi config/mysql.instance.json
[
{
"name" : "Localhost",
"host" : "localhost",
"metrics" : "status,newrelic",
"user" : "USER_NAME_HERE",
"passwd" : "USER_PASSWD_HERE"
},
]
看看是否能启来了
java -Xmx128m -jar newrelic_mysql_plugin-1.2.0.jar
开机的时候自动运行
sudo cp /usr/local/newrelic-mysql/etc/init.d/newrelic-mysql-plugin.rh /etc/init.d/newrelic-mysql-plugin
启动newrelic-mysql-plugin
sudo chmod 777 /etc/init.d/newrelic-mysql-plugin
sudo /etc/init.d/newrelic-mysql-plugin start