newrelic在服务器上创建巨大的日志文件

Max*_*mov 3 logging newrelic newrelic-platform

几天后我面临服务器磁盘溢出.在它充满10%之前.原因是文件newrelic_agent.log大小为5 - 30千兆字节.我在应用程序的文件nginxsite-enabled和主目录中找到了这么大的文件node.js express.

{"name":"newrelic","hostname":"hostname","pid":355,"component":"redis","level":10,"msg":"Adding Redis command trace segment transaction 2769.","time":"2014-01-02T06:20:11.894Z","v":0}
{"name":"newrelic","hostname":"hostname","pid":355,"component":"redis","level":10,"msg":"Adding Redis command trace segment transaction 2769.","time":"2014-01-02T06:20:11.894Z","v":0}
{"name":"newrelic","hostname":"hostname","pid":355,"component":"redis","level":10,"msg":"Adding Redis command trace segment transaction 2769.","time":"2014-01-02T06:20:11.895Z","v":0}
Run Code Online (Sandbox Code Playgroud)

在我删除这些文件后,我在一天中发现它们的规模如此糟糕.

如何在服务器上禁用此日志记录?我认为这是因为newrelic redis关键插件.或者唯一的方法是关闭这个插件?

Ste*_*ven 7

了解配置选项(包括日志记录级别)的最佳方法是与插件的发布者联系.

在这种情况下,默认情况下会启用详细日志记录.您可以通过在配置文件中放置#before 来关闭日志记录.verbose: 1config/newrelic_plugin.yml

此外,您应该考虑logrotate在服务器上运行日志管理应用程序,以防止此类文件增长.