简体   繁体   English

Newrelic不显示Docker容器的CPU和内存使用情况

[英]Newrelic does not display CPU & memory usage for Docker's container

I try to install New Relic Servers for Linux in my local vagrant machine running CentOS 7.2.1 with Docker 1.11.0 installed. 我尝试在安装了Docker 1.11.0的运行CentOS 7.2.1的本地流浪汉机器上安装New Relic Servers for Linux。 I have follow the step to enable Servers for Linux for Docker, all running containers are shown in New Relic Server page but CPU & memory usage are empty. 我按照步骤为Docker启用了Linux服务器,所有正在运行的容器都显示在New Relic Server页面中,但CPU和内存使用情况为空。 I also follow the guide to enable memory usage metrics but still no luck ( https://docs.newrelic.com/docs/servers/new-relic-servers-linux/installation-configuration/enabling-new-relic-servers-docker#enable-memory-usage ). 我也按照指南启用内存使用指标,但仍然没有运气( https://docs.newrelic.com/docs/servers/new-relic-servers-linux/installation-configuration/enabling-new-relic-servers-docker #enable-memory-usage )。

在此输入图像描述

Am I missing something? 我错过了什么吗? Any clue on why it's not working? 为什么它不起作用的任何线索?

I have manage to get the help from New Relic Support Engineer. 我已经设法得到New Relic支持工程师的帮助。 They found that Docker 1.10+ is not compatible with LSM. 他们发现Docker 1.10+与LSM不兼容。

Temparory workaround: 临时解决方法:

  1. Open the file /etc/newrelic/nrsysmond.cfg 打开文件/etc/newrelic/nrsysmond.cfg
  2. Add the line cgroup_style=0 添加行cgroup_style=0
  3. Save the file, and then restart LSM: 保存文件,然后重新启动LSM:

    sudo /etc/init.d/newrelic-sysmond restart

Wait a few minutes, you will see Docker metrics are being reported. 等几分钟,您将看到正在报告Docker指标。

But bear in mind that it's an undocumented and untested workaround. 但请记住,这是一个无证的,未经测试的解决方法。

Discussion link: https://discuss.newrelic.com/t/wrong-path-to-cpu-and-memoy-data/36177 讨论链接: https//discuss.newrelic.com/t/wrong-path-to-cpu-and-memoy-data/36177

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM