---
title: CRI
description: Track all your CRI metrics with Datadog
breadcrumbs: Docs > Integrations > CRI
---

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

This check monitors a Container Runtime Interface

## Setup{% #setup %}

### Installation{% #installation %}

CRI is a core [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) check that needs to be configured in the `datadog.yaml` with the `cri.d/conf.yaml`.

In `datadog.yaml`, configure your `cri_socket_path` for the Agent to query your current CRI (you can also configure default timeouts). In `cri.d/conf.yaml`, configure the check instance settings such as `collect_disk` if your CRI (such as `containerd`) reports disk usage metrics.

**Note**: If you're using the Agent in a container, set the `DD_CRI_SOCKET_PATH` environment variable to automatically enable the `CRI` check with the default configuration.

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

If you are using the Agent in a container, setting the `DD_CRI_SOCKET_PATH` environment variable to the CRI socket automatically enables the `CRI` integration with the default configuration.

For example, to install the integration on Kubernetes, edit your daemonset to mount the CRI socket from the host node to the Agent container and set the `DD_CRI_SOCKET_PATH` env var to the daemonset mountPath:

```yaml
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/crio/crio.sock
          volumeMounts:
            - name: crisocket
              mountPath: /var/run/crio/crio.sock
            - mountPath: /host/var/run
              name: var-run
              readOnly: true
          volumes:
            - hostPath:
                path: /var/run/crio/crio.sock
              name: crisocket
            - hostPath:
                path: /var/run
              name: var-run
```

**Note:** The `/var/run` directory must be mounted from the host to run the integration without issues.

### Configuration{% #configuration %}

1. Edit the `cri.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your crio performance data. See the [sample cri.d/conf.yaml](https://github.com/DataDog/datadog-agent/blob/master/cmd/agent/dist/conf.d/cri.d/conf.yaml.default) for all available configuration options.

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

### Validation{% #validation %}

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

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

### Metrics{% #metrics %}

CRI collect metrics about the resource usage of your containers running through the CRI.

CPU and memory metrics are collected out of the box and you can additionally collect some disk metrics if they are supported by your CRI (CRI-O doesn't support them).

|  |
|  |
| **cri.cpu.usage**(gauge)   | Cumulative CPU usage (sum across all cores) since object creation*Shown as nanocore* |
| **cri.disk.inodes**(gauge) | Represents the inodes used by the images*Shown as inode*                             |
| **cri.disk.used**(gauge)   | Represents the bytes used for images on the filesystem*Shown as byte*                |
| **cri.mem.rss**(gauge)     | The amount of working set memory in bytes*Shown as byte*                             |
| **cri.uptime**(gauge)      | Time since the container was started*Shown as second*                                |

### Service Checks{% #service-checks %}

CRI does not include service checks.

### Events{% #events %}

CRI does not include any events.

## Troubleshooting{% #troubleshooting %}

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