NewRelic性能监控之APM
官方文档:
tomcat,jetty,jboss
websphere
环境:
CentOS6.5 x64
Tomcat-7.0.62.0
支持agent和API传送数据
-
Send deployment information from the Java agent jar file
To learn how to submit deployment metadata to New Relic, visit the following URL:
Recording deployments with the Java agent
-
Send deployment information directly via HTTPS
Deployment information can be sent to New Relic via HTTPS with our RESTful API.
To notify New Relic of a deployment, you can POST to https://api.newrelic.com/deployments.xml
and add the API key as a header (x-api-key: 7e7ebd31f39f1c5cf5a58aa8bfb993f95fb591b0e75cf2e
), and the following parameters:
To use the deployments API, turn on API access in your account integration settings.
一.注册newrelic账号
二.Agent安装
1.选择监控类型
2.安装Agent
以tomcat为例,选择java
如: 我的tomcat根目录在/opt/tomcat
unzip newrelic-java-3.24.1.zip -d /opt/tomcat
cd /opt/tomcat/newrelic
java -jar newrelic.jar install
3.配置
vim /opt/tomcat/newrelic/newrelic.yml
最简配置:需要指定如下两项
license_key #控制台里可以获取,每个newrelic账号唯一,也是Agent能成功发送数据到服务器的关键
app_name #标识,可自定义
4.重启app
catalina.sh stop
catalina.sh start
tail -f /opt/tomcat/newrelic/logs/newrelic_agent.log
可以看到,Agent已经成功装数据发往newrelic.com的个人账号
否则,可能出现
删除监控实例
Once all reporting applications are shut down on the old host, it may take up to ten minutes for the old host to disappear from the New Relic list and the new one to appear.
-
To delete an app: From the New Relic menu bar, select APM > Applications.
OR
To delete a server: From the New Relic menu bar, select Servers > Servers.
- From the Applications (or Servers) index, wait for the app's (or server's) color-codedhealth status to turn gray.
- Select the app's or server's gear icon, select Delete app from New Relic APM or Delete server from New Relic Servers, and then select the confirmation button.
Account Owner or Admin: Disable the New Relic agent on your app or server, then restart it. After the agents stop reporting (their color-coded
health status turns gray), you can proceed with deleting the app from
Applications > Applications index or the server from
Servers > Servers index.