Supported OS
![Windows]()
To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.
To initiate an exception request to enable this integration for your organization, email support@ddog-gov.com.
개요
이 점검은 Containerd 컨테이너 런타임을 모니터링합니다.
설정
설치
Containerd는 Datadog 에이전트 코어 점검입니다.datadog.yaml과 containerd.d/conf.yaml 모두에서 Containerd를 구성해야 합니다.
에이전트가 Containerd에 쿼리할 수 있도록 datadog.yaml에서 cri_socket_path를 구성하세요. containerd.d/conf.yaml에서 이벤트의 점검 인스턴스 설정(예: filters)을 구성합니다.
컨테이너에서 설치
컨테이너에서 에이전트를 사용하는 경우 Containerd 소켓에 DD_CRI_SOCKET_PATH 환경 변수를 설정하면 Containerd 통합이 기본 구성으로 자동 활성화됩니다.
예를 들어 쿠버네티스에서 통합을 설치하려면 DaemonSet을 편집해 호스트 노드에서 Containerd 소켓을 에이전트 컨테이너에 연결하고 DD_CRI_SOCKET_PATH 환경 변수를 DaemonSet 연결 경로로 설정합니다.
Linux 컨테이너
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
참고: 호스트에 /var/run 디렉터리가 연결되어 있어야 통합이 정상적으로 작동합니다.
Windows 컨테이너
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
설정
에이전트의 구성 디렉터리 루트에서 conf.d/ 폴더의 containerd.d/conf.yaml 파일을 편집해 Containerd 성능 데이터 수집을 시작할 수 있습니다. 구성 옵션 전체를 보려면 containerd.d/conf.yaml 샘플을 보세요.
[에이전트]를 다시 시작합니다3.
검증
에이전트의 status 하위 명령을 실행하고 Checks 섹션 아래에서 containerd를 찾으세요.
수집한 데이터
메트릭
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.
| |
|---|
containerd.cpu.system (gauge) | The total CPU time Shown as nanosecond |
containerd.cpu.throttled.periods (gauge) | The total CPU throttled time (Linux only) Shown as nanosecond |
containerd.cpu.total (gauge) | The total CPU time Shown as nanosecond |
containerd.cpu.user (gauge) | The total user CPU time Shown as nanosecond |
containerd.image.pull (count) | The number of image pull requests Shown as byte |
containerd.image.size (gauge) | The size of the container image Shown as byte |
containerd.mem.cache (gauge) | The cache amount used (Linux only) Shown as byte |
containerd.mem.commit (gauge) | The committed memory (Windows only) Shown as byte |
containerd.mem.commit_peak (gauge) | The peak committed memory (Windows only) Shown as byte |
containerd.mem.current.failcnt (gauge) | The usage failcnt (Linux only) |
containerd.mem.current.limit (gauge) | The memory limit (Linux only) Shown as byte |
containerd.mem.current.usage (gauge) | The memory usage (Linux only) Shown as byte |
containerd.mem.kernel.usage (gauge) | The kernel usage (Linux only) Shown as byte |
containerd.mem.kernel_tcp.failcnt (gauge) | The kerneltcp failcnt (Linux only) |
containerd.mem.kernel_tcp.limit (gauge) | The kerneltcp limit (Linux only) Shown as byte |
containerd.mem.kernel_tcp.max (gauge) | The kerneltcp maximum usage (Linux only) Shown as byte |
containerd.mem.kernel_tcp.usage (gauge) | The kerneltcp usage (Linux only) Shown as byte |
containerd.mem.rss (gauge) | The rss amount used (Linux only) Shown as byte |
containerd.mem.swap.usage (gauge) | The swap usage (Linux only) Shown as byte |
containerd.mem.working_set (gauge) | The container working set usage Shown as byte |
containerd.proc.open_fds (gauge) | The number of open file descriptors Shown as file |
containerd.storage.read (rate) | Read bytes (Windows only) Shown as byte |
containerd.storage.write (rate) | Write bytes (Windows only) Shown as byte |
containerd.uptime (gauge) | Time since the container was started Shown as second |
This integration works on Linux and Windows, but some metrics are OS dependent. Look at metadata.csv for the list of OS dependent metrics.
이 통합은 Linux와 Windows에서 잘 작동하나 OS에 종속된 메트릭이 일부 있습니다. OS 종속 메트릭 목록을 보려면 metadata.csv를 살펴보세요.
이벤트
Containerd 점검은 이벤트를 수집할 수 있습니다. filters를 사용해 관련 이벤트를 선택하세요. 자세한 내용은 containerd.d/conf.yaml 샘플을 참고하세요.
서비스 점검
containerd.health
Returns CRITICAL if the Agent check is unable to connect to the monitored containerd socket. Returns OK otherwise.
Statuses: ok, critical
트러블슈팅
도움이 필요하신가요? Datadog 지원팀에 문의하세요.