Puppet Class: datadog_agent::integrations::network

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

Overview

Class: datadog_agent::integrations::network

This class will install the network integration

See the sample network.d/conf.yaml for all available configuration options github.com/DataDog/integrations-core/blob/master/network/datadog_checks/network/data/conf.yaml.default

Parameters:

$collect_connection_state
    Enable TCP connection state counts

Sample Usage:

class { 'datadog_agent::integrations::network' :
  collect_connection_state     => false,
  excluded_interfaces => [
   'lo0',
   'lo',
  ],
  excluded_interface_re = 'eth1.*',
  combine_connection_states => true
}

Parameters:

  • collect_connection_state (Boolean) (defaults to: false)
  • collect_connection_queues (Boolean) (defaults to: false)
  • excluded_interfaces (Array[String]) (defaults to: [])
  • excluded_interface_re (String) (defaults to: '')
  • combine_connection_states (Boolean) (defaults to: true)
  • collect_rate_metrics (Boolean) (defaults to: true)
  • collect_count_metrics (Boolean) (defaults to: false)
  • conntrack_path (String) (defaults to: '')
  • use_sudo_conntrack (Boolean) (defaults to: true)
  • whitelist_conntrack_metrics (Array[String]) (defaults to: [])
  • blacklist_conntrack_metrics (Array[String]) (defaults to: [])
  • collect_aws_ena_metrics (Boolean) (defaults to: false)
  • tags (Array[String]) (defaults to: [])
  • service (String) (defaults to: '')
  • min_collection_interval (Integer) (defaults to: 15)
  • empty_default_hostname (Boolean) (defaults to: false)
  • metric_patterns_include (Array[String]) (defaults to: [])
  • metric_patterns_exclude (Array[String]) (defaults to: [])


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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'manifests/integrations/network.pp', line 25

class datadog_agent::integrations::network (
  Boolean $collect_connection_state          = false,
  Boolean $collect_connection_queues         = false,
  Array[String] $excluded_interfaces         = [],
  String $excluded_interface_re              = '',
  Boolean $combine_connection_states         = true,
  Boolean $collect_rate_metrics              = true,
  Boolean $collect_count_metrics             = false,
  String $conntrack_path                     = '',
  Boolean $use_sudo_conntrack                = true,
  Array[String] $whitelist_conntrack_metrics = [],
  Array[String] $blacklist_conntrack_metrics = [],
  Boolean $collect_aws_ena_metrics           = false,
  Array[String] $tags                        = [],
  String $service                            = '',
  Integer $min_collection_interval           = 15,
  Boolean $empty_default_hostname            = false,
  Array[String] $metric_patterns_include     = [],
  Array[String] $metric_patterns_exclude     = [],
) inherits datadog_agent::params {
  require datadog_agent

  $dst_dir = "${datadog_agent::params::conf_dir}/network.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/network.yaml.erb'),
    require => Package[$datadog_agent::params::package_name],
    notify  => Service[$datadog_agent::params::service_name],
  }
}