New Relic Servers for Linux includes integrated Docker monitoring features. Use this document to install and configure Servers for Linux specifically to monitor servers with Docker containers.
Installing Docker with Servers for Linux
Docker monitoring requires New Relic Servers for Linux version 2.1.0 or higher, and is only available for 64-bit systems. To enable Docker monitoring:
- Install and configure Docker.
- Install New Relic Servers for Linux on your Docker server, NOT on your Docker container.
dockergroup doesn't already exist, create a new group named
groupadd -r docker
newrelicuser to the
dockergroup with a command similar to:
usermod -a -G docker newrelic
- Restart Docker.
- Restart the New Relic Servers for Linux agent.
Wait a few minutes, then view your Docker metrics in the Virtualization page.
Specifying the container file location
Most installations require no additional configuration. However, some older Linux distributions store their Docker container data files in non-standard locations:
- CGroup Root
If your distribution stores its CGroup files in a non-default location, you can specify the location in nrsysmond.cfg. Add the following command to nrsysmond.cfg, customizing the root directory for your system if necessary:
- Path to the Stat files
By default, the CPU and Memory stats collected per container are recorded from:
However, some Linux distributions customize this path. In that case, the most common location for these stats to be stored is:
To use this path instead, add the following command to nrsysmond.cfg and restart the Server Monitor to apply the change:
Enable memory usage metrics
On some Linux distributions, memory metric collection is disabled by default. To capture memory metrics with New Relic Servers, enable memory metric collection by adding kernel command-line parameters. For more information, see the Docker runtime metrics documentation.
For more help
Additional documentation resources include: