new relic java_NewRelic性能监控之APM

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:

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.选择监控类型

a4c26d1e5885305701be709a3d33442f.png

2.安装Agent

以tomcat为例,选择java

a4c26d1e5885305701be709a3d33442f.png

a4c26d1e5885305701be709a3d33442f.png

如: 我的tomcat根目录在/opt/tomcat

unzip newrelic-java-3.24.1.zip -d /opt/tomcat

cd /opt/tomcat/newrelic

java -jar newrelic.jar install

a4c26d1e5885305701be709a3d33442f.png

3.配置

vim /opt/tomcat/newrelic/newrelic.yml

最简配置:需要指定如下两项

license_key

#控制台里可以获取,每个newrelic账号唯一,也是Agent能成功发送数据到服务器的关键

app_name #标识,可自定义

a4c26d1e5885305701be709a3d33442f.png

4.重启app

catalina.sh stop

catalina.sh start

tail -f /opt/tomcat/newrelic/logs/newrelic_agent.log

a4c26d1e5885305701be709a3d33442f.png

可以看到,Agent已经成功装数据发往newrelic.com的个人账号

a4c26d1e5885305701be709a3d33442f.png

提示:请确保监控主机有访问newreplic服务器的网络权限https://collector.newrelic.com

否则,可能出现

a4c26d1e5885305701be709a3d33442f.png

删除监控实例

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.

a4c26d1e5885305701be709a3d33442f.png

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值