newrelic 安装使用 new relic

来源:互联网 发布:中国国家统计局cpi数据 编辑:程序博客网 时间:2024/05/22 13:50

www.newrelic.com  

newrelic 是一家上市公司,监控做的很猛,免费版本就很强

注册完账户,

1.

安装 APM

32-bit:

[html] view plain copy
 print?
  1. sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm  


64-bit:

[html] view plain copy
 print?
  1. sudo rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm  


Install the agent:

[html] view plain copy
 print?
  1. sudo yum install newrelic-php5  
  2. sudo newrelic-install install  

Add your PHP license key

Add your license key to the file you've set up with your New Relic properties:newrelic.ini or PHP.ini.

Your license setting:

newrelic.license="20xxxxxxxxxxxxxxxxa6"

卸载:

[html] view plain copy
 print?
  1. /usr/bin/newrelic-install  

会有选择提示框,好像是选择2 然后就可以卸载了


2.

关闭浏览器监控脚本:(不关闭,会对ajax造成影响。)






设置完成后需要重启     restart newrelic daemon

[html] view plain copy
 print?
  1. /etc/init.d/newrelic-daemon restart  

重启完成后,头部的js就没有了

3.安装SERVERS部分

[html] view plain copy
 print?
  1. rpm -Uvh https://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm  

[html] view plain copy
 print?
  1. yum install newrelic-sysmond  

[html] view plain copy
 print?
  1. nrsysmond-config --set license_key=20xxxxxxxxxxxxxxa6  
  2. /etc/init.d/newrelic-sysmond start  

Note:The configuration file is located at/etc/newrelic/nrsysmond.cfgand contains the license key and location for the log file:/var/log/newrelic/nrsysmond.log





参考:

https://docs.newrelic.com/docs/browser/new-relic-browser/installation-configuration/browser-settings-ui-options-browser-monitoring

https://docs.newrelic.com/docs/agents/php-agent/advanced-installation/starting-php-daemon-advanced