Skip to content

Commit

Permalink
Track integration configuration directories (#525)
Browse files Browse the repository at this point in the history
* Track integration configuration directories

* Fix path to redisdb configuration directory
  • Loading branch information
Aramack authored and truthbk committed May 28, 2019
1 parent 9f9efc2 commit 2f03da3
Show file tree
Hide file tree
Showing 48 changed files with 549 additions and 50 deletions.
12 changes: 11 additions & 1 deletion manifests/integrations/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/apache.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/apache.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/apache.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/cacti.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/cacti.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/cacti.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/cacti.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
11 changes: 10 additions & 1 deletion manifests/integrations/cassandra.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/cassandra.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/cassandra.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/cassandra.d"

file { $legacy_dst:
ensure => 'absent'
}
file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/ceph.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/ceph.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/ceph.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/ceph.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/consul.pp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/consul.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/consul.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/consul.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/directory.pp
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/directory.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/directory.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/directory.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/disk.pp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/disk.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/disk.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/disk.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/dns_check.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/dns_check.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/dns_check.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/dns_check.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
24 changes: 22 additions & 2 deletions manifests/integrations/docker_daemon.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,17 @@
}

if !$::datadog_agent::agent5_enable {
$legacy_conf = "${datadog_agent::conf6_dir}/docker_daemon.d/conf.yaml"
$legacy_dir = "${datadog_agent::conf6_dir}/docker_daemon.d"

file { $legacy_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$legacy_conf = "${legacy_dir}/conf.yaml"
} else {
$legacy_conf = "${datadog_agent::conf_dir}/docker.yaml"
}
Expand All @@ -75,7 +85,17 @@
}

if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/docker.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/docker.d"

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = "${datadog_agent::conf_dir}/docker_daemon.yaml"
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/elasticsearch.pp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/elastic.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/elastic.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/elastic.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/fluentd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/fluentd.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/fluentd.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/fluentd.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/generic.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/${integration_name}.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/${integration_name}.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/${integration_name}.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/haproxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/haproxy.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/haproxy.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/haproxy.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/http_check.pp
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/http_check.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/http_check.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/http_check.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/jenkins.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/jenkins.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/jenkins.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/jenkins.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/jmx.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/jmx.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/jmx.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/jmx.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
12 changes: 11 additions & 1 deletion manifests/integrations/kafka.pp
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,20 @@

$legacy_dst = "${datadog_agent::conf_dir}/kafka.yaml"
if !$::datadog_agent::agent5_enable {
$dst = "${datadog_agent::conf6_dir}/kafka.d/conf.yaml"
$dst_dir = "${datadog_agent::conf6_dir}/kafka.d"
file { $legacy_dst:
ensure => 'absent'
}

file { $dst_dir:
ensure => directory,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0755',
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
$dst = "${dst_dir}/conf.yaml"
} else {
$dst = $legacy_dst
}
Expand Down
Loading

0 comments on commit 2f03da3

Please sign in to comment.