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

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

我尝试在我的本地 vagrant 机器 运行 CentOS 7.2.1 上安装 Linux 的 New Relic Servers 并安装了 Docker 1.11.0。我已按照步骤为 Docker 启用 Linux 服务器,所有 运行 容器都显示在新 Relic 服务器页面中,但 CPU 和内存使用为空。我也按照指南启用内存使用指标,但仍然没有成功 (https://docs.newrelic.com/docs/servers/new-relic-servers-linux/installation-configuration/enabling-new-relic-servers-docker#enable-memory-usage)。

我错过了什么吗?关于为什么它不起作用的任何线索?

我已经设法得到 New Relic 支持工程师的帮助。他们发现 Docker 1.10+ 与 LSM 不兼容。

临时解决方法:

  1. 打开文件/etc/newrelic/nrsysmond.cfg
  2. 添加行 cgroup_style=0
  3. 保存文件,然后重启 LSM:

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

稍等几分钟,您将看到正在报告 Docker 个指标。

But bear in mind that it's an undocumented and untested workaround.

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