我正在尝试使用New Relic's Java Agent 3.1.0
来监控基于Scala的Play 2.2.1
网络应用,但是NR Web UI似乎并没有从我的服务器收集任何数据。
我已验证我的newrelic.yml
配置文件是否正确,并且使用以下命令启动应用时,代理似乎按预期挂钩(根据官方说明found here):< / p>
root@myserver:/var/www/myapp/target/universal/myapp# ./bin/myapp -J-javaagent:/var/www/myapp/newrelic/newrelic.jar -Dnewrelic.bootstrap_classpath=true
Nov 4, 2013 18:15:41 +1100 NewRelic 1 INFO: Agent is using Logback
Nov 4, 2013 18:15:41 +1100 NewRelic 1 INFO: Loading configuration file "/var/www/myapp/newrelic/./newrelic.yml"
Play server process ID is 11599
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
运行上述内容后,我可以看到我的应用程序的名称显示在NR的Web UI的“应用程序”部分中,因此我的应用程序肯定在ping服务,但我没有在仪表板中看到任何实际数据。 / p>
我的newrelic_agent.log
文件如下:
Nov 4, 2013 17:39:20 +1100 NewRelic 1 INFO: Writing to New Relic log file: /var/www/myapp/newrelic/logs/newrelic_agent.log
Nov 4, 2013 17:39:20 +1100 NewRelic 1 INFO: Agent Host: myserver IP: <snipped - it had my IP here!>
Nov 4, 2013 17:39:24 +1100 NewRelic 1 ERROR: com/caucho/vfs/WriteStream is marked as a weaved class, but no methods are matched to be weaved.
Nov 4, 2013 17:39:36 +1100 NewRelic 1 INFO: Configured to connect to New Relic at collector.newrelic.com:443
Nov 4, 2013 17:39:36 +1100 NewRelic 1 INFO: Setting audit_mode to false
Nov 4, 2013 17:39:36 +1100 NewRelic 1 INFO: Setting protocol to "https"
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: Configuration file is /var/www/myapp/newrelic/./newrelic.yml
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: New Relic Agent v3.1.0 has started
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: Java version: 1.7.0_45
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: The newrelic.bootstrap_classpath system property is deprecated.
Nov 4, 2013 17:39:37 +1100 NewRelic 1 INFO: Agent class loader is null which typically means the agent is loaded by the bootstrap class loader.
Nov 4, 2013 17:39:44 +1100 NewRelic 9 INFO: Collector redirection to collector-9.newrelic.com:443
Nov 4, 2013 17:39:45 +1100 NewRelic 9 INFO: Agent run id: 404659456
Nov 4, 2013 17:39:45 +1100 NewRelic 9 INFO: Agent 11288@myserver/My App connected to collector.newrelic.com:443
Nov 4, 2013 17:39:45 +1100 NewRelic 9 INFO: Real user monitoring is enabled with auto instrumentation for application "My App"
Nov 4, 2013 17:39:45 +1100 NewRelic 9 INFO: Errors will be sent to New Relic for Mealdrum
有人可以提出任何建议吗?谢谢!
答案 0 :(得分:3)
虽然此日志显示了干净的代理启动,但您可能是3.1.0代理问题的受害者,该代理干扰了New Relic的Play 2应用程序。 Java Agent 3.1.1解决了这个问题。发行说明位于文档网站:https://docs.newrelic.com/docs/releases/java
我最近注意到我们的docs网站上没有任何更新说明,但它很容易:替换你的newrelic.jar而不是其他任何内容并重新启动你的JVM。
安装3.1.1并重新启动JVM后,度量标准应正确报告。如果没有,我会在support.newrelic.com上打开一张票,这样我们就可以查看详细的日志了。
答案 1 :(得分:2)
通过直接在支持服务单中工作,我们发现了play 2.2和New Relic的另一个可能的问题,我们将通过发布我们的Java代理的3.2版来解决这个问题。它应该在2013年12月2日之后不久出现,并将显示在release notes page.
上