通过我的应用程序访问 newrelic API
我正在使用 Newrelic 作为 java 代理。我在提示符中使用命令“java -jar newrelic.jar install”来安装 newrelic.yml 文件。运行时,它显示消息“INSTALL SUCCESSFUL”和一些其他信息。我还在运行 run.bat 文件中找到了 newrelic.yml 设置。但是当将端口运行为 "localhost:8080/newrelic" 时,我无法在浏览器中看到 newrelic API。我在端口 8080 启动了我的服务器。
newrelic diectory 中的日志文件夹。我的 newrelic_agent.log 包含以下几行...,
Feb 8, 2012 05:49:07 PM NewRelic INFO: Writing to New Relic log file: D:\work\software\jboss-6.0.0.Final\newrelic\logs\newrelic_agent.log
Feb 8, 2012 05:49:09 PM NewRelic INFO: Configured to connect to New Relic at collector.newrelic.com:80
Feb 8, 2012 05:49:09 PM NewRelic INFO: Setting protocol to "http"
Feb 8, 2012 05:49:09 PM NewRelic INFO: Configuration file is D:\work\software\jboss-6.0.0.Final\newrelic\.\newrelic.yml
Feb 8, 2012 05:49:09 PM NewRelic WARN: The apdex_t setting is obsolete and is ignored! Set the apdex_t value for an application in New Relic UI
Feb 8, 2012 05:49:09 PM NewRelic INFO: New Relic Agent v2.3.0 has started
Feb 8, 2012 05:49:09 PM NewRelic INFO: Java version: 1.6.0_12
Feb 8, 2012 05:49:30 PM NewRelic INFO: JVM is shutting down
Feb 8, 2012 05:49:30 PM NewRelic INFO: New Relic Agent has shutdown
我确定尚未在我的浏览器中启动 newrelic API。它显示错误为“ HTTP 404 请求资源 /k12/newrelic 不可用。我使用的是 jdk 1.6 请帮助我..?
.I'm using Newrelic for java agent.I install the newrelic.yml file using the command "java -jar newrelic.jar install" in my prompt. When running, it shows the message as INSTALL SUCCESSFUL and some other information. I also find the newrelic.yml setup in running the run.bat file.But i'm not able to see the newrelic API in my browser when running the port as "localhost:8080/newrelic" . I'm started my server in the port 8080.
The log folder in newrelic diectory.My newrelic_agent.log containing the following lines...,
Feb 8, 2012 05:49:07 PM NewRelic INFO: Writing to New Relic log file: D:\work\software\jboss-6.0.0.Final\newrelic\logs\newrelic_agent.log
Feb 8, 2012 05:49:09 PM NewRelic INFO: Configured to connect to New Relic at collector.newrelic.com:80
Feb 8, 2012 05:49:09 PM NewRelic INFO: Setting protocol to "http"
Feb 8, 2012 05:49:09 PM NewRelic INFO: Configuration file is D:\work\software\jboss-6.0.0.Final\newrelic\.\newrelic.yml
Feb 8, 2012 05:49:09 PM NewRelic WARN: The apdex_t setting is obsolete and is ignored! Set the apdex_t value for an application in New Relic UI
Feb 8, 2012 05:49:09 PM NewRelic INFO: New Relic Agent v2.3.0 has started
Feb 8, 2012 05:49:09 PM NewRelic INFO: Java version: 1.6.0_12
Feb 8, 2012 05:49:30 PM NewRelic INFO: JVM is shutting down
Feb 8, 2012 05:49:30 PM NewRelic INFO: New Relic Agent has shutdown
I'm sure not yet started the newrelic API in my browser.It shows an error as "HTTP 404 the request resource /k12/newrelic is not available.I'm using j.d.k 1.6
Help me please..?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
New Relic Ruby 代理有一个开发者模式,位于您尝试访问的 /newrelic 路径上,但 Java 代理没有。开发者模式将为您提供应用程序发出的每个单独 Web 请求的详细跟踪,这类似于普通 New Relic 产品对事务跟踪所做的操作。
要使用 New Relic 并报告性能数据,看起来您已经正确配置了所有内容。您应该能够登录 https://rpm.newrelic.com 并查看您的应用程序在做什么。
您提到“newrelic API”,但我不确定您到底在寻找什么。有一个 Java 代理 API,可让您配置代理。还有一个 New Relic HTTP REST API 这将让您检索应用程序报告的数据。
The New Relic Ruby agent has a Developer Mode that lives at the /newrelic path you're trying to reach, but the Java agent does not. Developer Mode would give you a detailed trace of each individual web request your app makes that's similar to what the normal New Relic product does with Transaction Traces.
To use New Relic and report performance data, it looks like you've got everything configured correctly. You should be able to log in to https://rpm.newrelic.com and see what your app is doing.
You mentioned "the newrelic API", but I'm not sure what you are looking for exactly. There is an API for the Java agent that lets you configure the agent. There's also a New Relic HTTP REST API that will let you retrieve data reported by your applications.