---
title: Container
description: Track your container metrics with Datadog
breadcrumbs: Docs > Integrations > Container
---

# Container
Supported OS Integration version1.0.0
## Overview{% #overview %}

This check reports a set of metrics about any running containers, regardless of the runtime used to start them.

**NOTE**: The `container` check is different from the `containerd` check. The `container` checks report standardized metrics for all containers found on the system, regardless of the container runtime. The `containerd` is dedicated to `containerd` runtime and publishes metrics in the `containerd.*` namespace.

## Setup{% #setup %}

### Installation{% #installation %}

Container is a core Datadog Agent check and is automatically activated if any supported container runtime is detected. Configuring access to supported container runtimes (Docker, containerd) may be required depending on your environment.

#### Installation on containers{% #installation-on-containers %}

The `container` check requires some folders to be mounted to allow for automatic activation. This is handled by the official Helm Chart, the Datadog Operator, and as documented set ups for Kubernetes, Docker, ECS, and ECS Fargate.

### Configuration{% #configuration %}

The `container` check exposes specific configuration settings to emit extended memory metrics in addition to standard set. To customize common fields or to force the activation of the `container` check, follow these steps:

1. Create the `container.d/conf.yaml` file in the `conf.d/` folder at the root of your Agent's configuration directory.

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands.md#start-stop-and-restart-the-agent)

The `container` check can collect metrics about CPU, Memory, Network and Disks IO. Some metrics may not be available depending on your environment (Linux / Windows, for instance).

### Validation{% #validation %}

[Run the Agent's `status` subcommand](https://docs.datadoghq.com/agent/guide/agent-commands.md#start-stop-and-restart-the-agent) and look for `container` under the **Checks** section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **container.cpu.limit**(gauge)                  | The maximum CPU time available to the container*Shown as nanocore*                                                                               |
| **container.cpu.system**(gauge)                 | The container system CPU usage*Shown as nanocore*                                                                                                |
| **container.cpu.throttled**(gauge)              | The total cpu throttled time*Shown as nanosecond*                                                                                                |
| **container.cpu.throttled.periods**(gauge)      | The number of periods during which the container was throttled                                                                                   |
| **container.cpu.usage**(gauge)                  | The container total CPU Usage*Shown as nanocore*                                                                                                 |
| **container.cpu.user**(gauge)                   | The container userspace CPU usage*Shown as nanocore*                                                                                             |
| **container.io.read**(gauge)                    | The number of bytes read from disks by this container*Shown as byte*                                                                             |
| **container.io.read.operations**(gauge)         | The number of read operations done by this container                                                                                             |
| **container.io.write**(gauge)                   | The number of bytes written to disks by this container*Shown as byte*                                                                            |
| **container.io.write.operations**(gauge)        | The number of write operations done by this container                                                                                            |
| **container.memory.active\_anon**(gauge)        | The container active anonymous memory (requires extended_memory_metrics flag in the check config)*Shown as byte*                                 |
| **container.memory.active\_file**(gauge)        | The container active file-backed memory (requires extended_memory_metrics flag in the check config)*Shown as byte*                               |
| **container.memory.cache**(gauge)               | The container cache usage*Shown as byte*                                                                                                         |
| **container.memory.commit**(gauge)              | The container commit memory usage*Shown as byte*                                                                                                 |
| **container.memory.commit.peak**(gauge)         | The container peak commit memory usage*Shown as byte*                                                                                            |
| **container.memory.file\_dirty**(gauge)         | The container memory that are waiting to get written back to the disk (requires extended_memory_metrics flag in the check config)*Shown as byte* |
| **container.memory.file\_mapped**(gauge)        | The container mapped file memory (requires extended_memory_metrics flag in the check config)*Shown as byte*                                      |
| **container.memory.file\_writeback**(gauge)     | The container memory that is queued for syncing to disk (requires extended_memory_metrics flag in the check config)*Shown as byte*               |
| **container.memory.inactive\_anon**(gauge)      | The container inactive anonymous memory (requires extended_memory_metrics flag in the check config)*Shown as byte*                               |
| **container.memory.inactive\_file**(gauge)      | The container inactive file-backed memory (requires extended_memory_metrics flag in the check config)*Shown as byte*                             |
| **container.memory.kernel**(gauge)              | The container kernel memory usage*Shown as byte*                                                                                                 |
| **container.memory.limit**(gauge)               | The container memory limit*Shown as byte*                                                                                                        |
| **container.memory.major\_page\_faults**(count) | Number of major page faults incurred                                                                                                             |
| **container.memory.oom\_events**(gauge)         | The number of OOM events triggered by the container                                                                                              |
| **container.memory.page\_faults**(count)        | Total number of page faults incurred                                                                                                             |
| **container.memory.page\_tables**(gauge)        | The container memory allocated for page tables (requires extended_memory_metrics flag in the check config)*Shown as byte*                        |
| **container.memory.refault\_anon**(count)       | The number of refaults of previously evicted anonymous pages (requires extended_memory_metrics flag in the check config)*Shown as byte*          |
| **container.memory.refault\_file**(count)       | The number of refaults of previously evicted file pages (requires extended_memory_metrics flag in the check config)*Shown as byte*               |
| **container.memory.rss**(gauge)                 | The container RSS usage*Shown as byte*                                                                                                           |
| **container.memory.shmem**(gauge)               | The container swap-backed memory such as tmpfs (requires extended_memory_metrics flag in the check config), shm segments…*Shown as byte*         |
| **container.memory.soft\_limit**(gauge)         | The container memory soft limit*Shown as byte*                                                                                                   |
| **container.memory.swap**(gauge)                | The container swap usage*Shown as byte*                                                                                                          |
| **container.memory.unevictable**(gauge)         | The container memory that can't be reclaimed (requires extended_memory_metrics flag in the check config)*Shown as byte*                          |
| **container.memory.usage**(gauge)               | The container total memory usage*Shown as byte*                                                                                                  |
| **container.memory.usage.peak**(gauge)          | The maximum memory usage recorded since the container started*Shown as byte*                                                                     |
| **container.memory.working\_set**(gauge)        | The container working set usage*Shown as byte*                                                                                                   |
| **container.net.rcvd**(gauge)                   | The number of network bytes received (per interface)*Shown as byte*                                                                              |
| **container.net.rcvd.packets**(gauge)           | The number of network packets received (per interface)                                                                                           |
| **container.net.sent**(gauge)                   | The number of network bytes sent (per interface)*Shown as byte*                                                                                  |
| **container.net.sent.packets**(gauge)           | The number of network packets sent (per interface)                                                                                               |
| **container.pid.open\_files**(gauge)            | The number of open file descriptors (Linux only)                                                                                                 |
| **container.pid.thread\_count**(gauge)          | The number of threads running inside this container                                                                                              |
| **container.pid.thread\_limit**(gauge)          | The maximum number of threads for this container                                                                                                 |
| **container.restarts**(gauge)                   | The number of container restarted                                                                                                                |
| **container.uptime**(gauge)                     | The container uptime*Shown as second*                                                                                                            |

If you need extended container memory metrics `extended_memory_metrics` has to be set to `true`. It will enable following metrics: active_anon, inactive_anon, active_file, inactive_file, unevictable, shmem, file_mapped, file_dirty, file_writeback, page_tables, refault_anon, refault_file

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
