This check monitors the Containerd container runtime.
Containerd is a core Datadog Agent check. You must configure Containerd in both datadog.yaml
and containerd.d/conf.yaml
.
In datadog.yaml
, configure your cri_socket_path
for the Agent to query Containerd. In containerd.d/conf.yaml
, configure the check instance settings (such as filters
) for the events.
If you are using the Agent in a container, setting the DD_CRI_SOCKET_PATH
environment variable to the Containerd socket automatically enables the Containerd integration with the default configuration.
For example, to install the integration on Kubernetes, edit your DaemonSet to mount the Containerd socket from the host node to the Agent container and set the DD_CRI_SOCKET_PATH
environment variable to the DaemonSet mount path:
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: datadog-agent
spec:
template:
spec:
containers:
- name: datadog-agent
# ...
env:
- name: DD_CRI_SOCKET_PATH
value: /var/run/containerd/containerd.sock
volumeMounts:
- name: containerdsocket
mountPath: /var/run/containerd/containerd.sock
- mountPath: /host/var/run
name: var-run
readOnly: true
volumes:
- hostPath:
path: /var/run/containerd/containerd.sock
name: containerdsocket
- hostPath:
path: /var/run
name: var-run
Note: The /var/run
directory must be mounted from the host to run the integration without issues.
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: datadog-agent
spec:
template:
spec:
containers:
- name: datadog-agent
# ...
env:
- name: DD_CRI_SOCKET_PATH
value: \\\\.\\pipe\\containerd-containerd
volumes:
- hostPath:
path: \\\\.\\pipe\\containerd-containerd
name: containerdsocket
volumeMounts:
- name: containerdsocket
mountPath: \\\\.\\pipe\\containerd-containerd
-
Edit the
containerd.d/conf.yaml
file, in theconf.d/
folder at the root of your Agent's configuration directory to start collecting your Containerd performance data. See the sample containerd.d/conf.yaml for all available configuration options.
Run the Agent's status
subcommand and look for containerd
under the Checks section.
Containerd collects metrics about the resource usage of your containers.
CPU, memory, block I/O, or huge page table metrics are collected out of the box. Additionally, you can also collect some disk metrics.
See metadata.csv for a list of metrics provided by this integration.
This integration works on Linux and Windows, but some metrics are OS dependent. Look at metadata.csv
for the list of OS dependent metrics.
The Containerd check can collect events. Use filters
to select the relevant events. See the sample containerd.d/conf.yaml to have more details.
See service_checks.json for a list of service checks provided by this integration.
Need help? Contact Datadog support.