Puppet Class: datadog_agent::integrations::oom_kill

Inherits:
datadog_agent::params
Defined in:
manifests/integrations/oom_kill.pp

Overview

Class: datadog_agent::integrations::oom_kill

This class will install the necessary configuration for the oom_kill integration For it to work you also need to enable the system-probe with enable_oom_kill set to true.

See the sample oom_kill.d/conf.yaml for all available configuration options github.com/DataDog/datadog-agent/blob/main/cmd/agent/dist/conf.d/oom_kill.d/conf.yaml.example

Parameters:

$instances:
    Array of hashes for all oom_kill configs and associates tags. See example

Sample Usage:

class { 'datadog_agent::integrations::oom_kill':
  instances => [
      {
          'collect_oom_kill'  => true,
          'tags' => ['instance:foo'],
      },
  ],
}

Parameters:

  • instances (Array) (defaults to: [])


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'manifests/integrations/oom_kill.pp', line 24

class datadog_agent::integrations::oom_kill (
  Array $instances = [],
) inherits datadog_agent::params {
  require datadog_agent

  $dst_dir = "${datadog_agent::params::conf_dir}/oom_kill.d"
  file { $dst_dir:
    ensure  => directory,
    owner   => $datadog_agent::dd_user,
    group   => $datadog_agent::params::dd_group,
    mode    => $datadog_agent::params::permissions_directory,
    require => Package[$datadog_agent::params::package_name],
    notify  => Service[$datadog_agent::params::service_name],
  }
  $dst = "${dst_dir}/conf.yaml"

  file { $dst:
    ensure  => file,
    owner   => $datadog_agent::dd_user,
    group   => $datadog_agent::params::dd_group,
    mode    => $datadog_agent::params::permissions_protected_file,
    content => template('datadog_agent/agent-conf.d/oom_kill.yaml.erb'),
    require => Package[$datadog_agent::params::package_name],
    notify  => Service[$datadog_agent::params::service_name],
  }
}