1.安装nginx-nr-agent

wget http://nginx.org/packages/ubuntu/pool/nginx/n/nginx-nr-agent/nginx-nr-agent_2.0.0-9_all.deb
sudo apt-get install python-daemon python-setproctitle
sudo dpkg -i nginx-nr-agent_2.0.0-9_all.deb

2.修改配置

修改 /etc/nginx-nr-agent/nginx-nr-agent.ini

newrelic_license_key=YOUR_LICENSE_KEY_HERE

# data sources settings
[source1]
name=nginxtips.com
url=http://www.scalescale.com/tips/nginx/status

3.重启服务

sudo service nginx-nr-agent start