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 [email protected].
概要
このチェックは、Containerd コンテナランタイムを監視します。
セットアップ
インストール
Containerd は Datadog Agent の中核となるチェックです。Containerd は、datadog.yaml と containerd.d/conf.yaml の両方で構成する必要があります。
datadog.yaml では、Agent が Containerd に問い合わせるために使用する cri_socket_path を構成します。containerd.d/conf.yaml では、イベントのチェックインスタンス設定 (filters など) を構成します。
コンテナへのインストール
コンテナで Agent を使用している場合は、DD_CRI_SOCKET_PATH 環境変数を Containerd ソケットに設定すると、デフォルト構成の Containerd インテグレーションが自動的に有効になります。
たとえば、Kubernetes でインテグレーションをインストールするには、DaemonSet を編集して、Containerd ソケットをホストノードから Agent コンテナにマウントし、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_ソケットパス
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
構成
Containerd のパフォーマンスデータの収集を開始するには、Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの containerd.d/conf.yaml ファイルを編集します。使用可能なすべてのコンフィギュレーションオプションの詳細については、サンプル containerd.d/conf.yaml を参照してください。
Agent を再起動します。
検証
Agent の 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 のサポートチームまでお問合せください。