The Linux agent for New Relic Infrastructure automatically collects metrics for Docker containers running on instrumented hosts. For Docker containers, the Processes page indicates which processes are containerized and the container ID for each Docker process. Infrastructure also captures any Docker labels associated with your containers, for filtering in Infrastructure and building Insights queries.
Install for Docker
Following the standard Infrastructure installation procedures for Linux, install the Infrastructure agent on the parent host (not inside the Docker container). Collecting Docker metrics requires no additional configuration.
The ability to report on Docker container information like container name, label, image ID, etc. depends on the Docker daemon. Using
docker-containerd-shim to run containers without the Docker daemon will impair the agent's ability to collect some metrics used in grouping data.
View Docker metrics in Infrastructure
The Infrastructure Processes page lists Docker processes alongside other running processes. To identify Docker processes:
- Look for images with an image ID listed in the Image column.
- Filter the page to view only specific Docker containers.
- View only Docker processes
To view all Docker containers, type
containedin the in-page filter, then select
truefrom the dropdown. The Processes page then shows only containerized processes.
- View each instance of a Docker image
To view all copies of a Docker container across your environment, click on its image ID in the Image column. The Processes page then shows only processes that share that unique image ID.
- View resource usage for each Docker image
To view results grouped by Docker image (for example, to identify images that generate higher CPU load), select
containerImageNamefrom the Group By field.
- View containers associated with a Docker label
To view only Docker containers with a particular Docker label, type
containerLabel_in the in-page filter, then select your label from the dropdown list. For example,
View Docker metrics in Insights
You can also view Docker metrics in Insights by querying these attributes in the
For example, to see how many containers are associated with each Docker image:
SELECT uniqueCount(containerId) FROM ProcessSample FACET containerImageName SINCE 1 HOUR AGO TIMESERIES