Supported OS Linux

Versión de integración1.0.0

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.

Esta página aún no está disponible en español. Estamos trabajando en su traducción.
Si tiene alguna pregunta o comentario sobre nuestro proyecto de traducción actual, ¡no dude en contactarnos!

Overview

This check monitors the kernel OOM (out of memory) kill process through the Datadog Agent and the System Probe.

Setup

Installation

The OOM Kill check is included in the Datadog Agent package. It relies on an eBPF program implemented in the System Probe.

The eBPF program used by the System Probe is compiled at runtime and requires you to have access to the proper kernel headers.

On Host and Docker installations, install the kernel headers:

  • Debian-like distributions:
    apt install -y linux-headers-$(uname -r)
    
  • RHEL-like distributions:
    yum install -y kernel-headers-$(uname -r)
    yum install -y kernel-devel-$(uname -r)
    

Note: Kernel version 4.9 or later is required for the OOM Kill check to work. In addition, Windows and CentOS/RHEL versions earlier than 8 are not supported.

Configuration

Host

  1. In the system-probe.yaml file at the root of your Agent’s configuration directory, add the following configuration:

    system_probe_config:
      enable_oom_kill: true
    
  2. The Agent has a pre-packaged oom_kill.d/conf.yaml.default file that is used when the check is enabled in the system-probe.yaml. This is in the conf.d/ folder at the root of your Agent’s configuration directory. You can create a custom oom_kill.d/conf.yaml file to change the configuration options.

  3. Restart the Agent.

Docker

  1. Start the Agent container with the environment variable to enable the check in the System Probe process. This uses the pre-packaged oom_kill.d/conf.yaml.default once enabled:

    -e DD_SYSTEM_PROBE_CONFIG_ENABLE_OOM_KILL=true
    
  2. Mount the following volumes to the Agent container:

    -v /sys/kernel/debug:/sys/kernel/debug
    -v /lib/modules:/lib/modules
    -v /usr/src:/usr/src
    
  3. Add the following permission to enable BPF operations:

    --privileged
    

    From kernel version 5.8, the --privileged parameter can be replaced by --cap-add CAP_BPF.

Note: --privileged mode is not supported in Docker swarm.

Kubernetes

Datadog Operator

Set the features.oomKill.enabled parameter in the DatadogAgent manifest:

apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  #(...)
  features:
    oomKill:
      enabled: true

Note: When using COS (Container Optimized OS), override the src volume in the node Agent:

apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  #(...)
  features:
    oomKill:
      enabled: true
  override:
    nodeAgent:
      volumes:
      - emptyDir: {}
        name: src
Helm

With the Datadog Helm chart, set the following configuration in your values.yaml file:

datadog:
  #(...)
  systemProbe:
    enableOOMKill: true

With these settings, the system-probe container is automatically deployed with the required configuration and permissions.

Validation

Run the Agent’s status subcommand and look for oom_kill under the Collector section.

Data Collected

Metrics

oom_kill.oom_process.count
(count)
The count of processes OOM killed
Shown as process

Service Checks

The OOM Kill check does not include any service checks.

Events

The OOM Kill check submits an event for each OOM Kill that includes the killed process ID and name, as well as the triggering process ID and name.

Troubleshooting

Need help? Contact Datadog support.