加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

服务器监控之New Relic

(2016-09-22 21:44:12)
分类: 服务器

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.选择监控类型
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 #标识,可自定义 
catalina.sh stop
catalina.sh start
tail -f /opt/tomcat/newrelic/logs/newrelic_agent.log
http://s2/mw690/002BYBFzgy6YAj4W9gt31&690
可以看到,Agent已经成功装数据发往newrelic.com的个人账号
http://s12/mw690/002BYBFzgy6YAjJKh7R2b&690
提示:请确保监控主机有访问newreplic服务器的网络权限https://collector.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.
  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.
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.

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有