NewRelic性能监控之APM

NewRelic性能监控之APM

官方文档:
tomcat,jetty,jboss
websphere
环境:
CentOS6.5 x64
Tomcat-7.0.62.0

支持agent和API传送数据
  1. 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

  2. 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.选择监控类型
NewRelic性能监控之APM
2.安装Agent
以tomcat为例,选择java
NewRelic性能监控之APM


NewRelic性能监控之APM

如: 我的tomcat根目录在/opt/tomcat
unzip newrelic-java-3.24.1.zip -d /opt/tomcat
cd /opt/tomcat/newrelic
java -jar newrelic.jar install
NewRelic性能监控之APM
3.配置
vim /opt/tomcat/newrelic/newrelic.yml
最简配置:需要指定如下两项
license_key #控制台里可以获取,每个newrelic账号唯一,也是Agent能成功发送数据到服务器的关键
app_name #标识,可自定义 
NewRelic性能监控之APM
4.重启app
catalina.sh stop
catalina.sh start
tail -f /opt/tomcat/newrelic/logs/newrelic_agent.log
NewRelic性能监控之APM
可以看到,Agent已经成功装数据发往newrelic.com的个人账号
NewRelic性能监控之APM
提示:请确保监控主机有访问newreplic服务器的网络权限https://collector.newrelic.com
否则,可能出现
NewRelic性能监控之APM


删除监控实例
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.
  1. 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.

  2. From the Applications (or Servers) index, wait for the app's (or server's) color-codedhealth status to turn gray.
  3. 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.
Gear icon: Delete app
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.
原文地址:https://www.cnblogs.com/lixuebin/p/10814236.html