Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 35 additions & 41 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ GEM
ansi (1.5.0)
ast (2.4.2)
awesome_print (1.9.2)
aws-eventstream (1.3.0)
aws-partitions (1.1027.0)
aws-sdk-core (3.214.0)
aws-eventstream (1.3.1)
aws-partitions (1.1054.0)
aws-sdk-core (3.219.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
jmespath (~> 1, >= 1.6.1)
aws-sdk-ec2 (1.498.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-ec2 (1.506.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.1)
aws-sigv4 (1.11.0)
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.2.0)
bcrypt_pbkdf (1.0.1)
bcrypt_pbkdf (1.0.1-x64-mingw32)
bigdecimal (3.1.8)
bigdecimal (3.1.9)
bindata (2.5.0)
bolt (4.0.0)
CFPropertyList (>= 2.2)
Expand Down Expand Up @@ -53,24 +53,24 @@ GEM
concurrent-ruby
coderay (1.1.3)
colored2 (3.1.2)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
cri (2.15.12)
deep_merge (1.2.2)
dependency_checker (1.0.1)
parallel
puppet_forge (>= 2.2, < 6.0)
rake (~> 13.0)
semantic_puppet (~> 1.0)
diff-lcs (1.5.1)
diff-lcs (1.6.0)
docile (1.4.1)
docker-api (2.4.0)
excon (>= 0.64.0)
multi_json
domain_name (0.6.20240107)
ed25519 (1.3.0)
erubi (1.13.1)
excon (1.2.2)
excon (1.2.3)
facter (4.10.0)
hocon (~> 1.3)
thor (>= 1.0.1, < 1.3)
Expand All @@ -90,10 +90,11 @@ GEM
net-http-persistent (>= 4.0.4, < 5)
fast_gettext (2.4.0)
prime
ffi (1.16.3)
ffi (1.17.1)
ffi (1.17.1-arm64-darwin)
forwardable (1.3.3)
getoptlong (0.2.1)
gettext (3.5.0)
gettext (3.5.1)
erubi
locale (>= 2.0.5)
prime
Expand All @@ -111,7 +112,7 @@ GEM
hiera-eyaml (3.4.0)
highline
optimist
highline (3.1.1)
highline (3.1.2)
reline
hocon (1.4.0)
http-accept (1.7.0)
Expand All @@ -125,7 +126,7 @@ GEM
json-schema (5.1.1)
addressable (~> 2.8)
bigdecimal (~> 3.1)
jwt (2.9.3)
jwt (2.10.1)
base64
kitchen-docker (3.0.0)
test-kitchen (>= 1.0.0)
Expand All @@ -150,19 +151,19 @@ GEM
little-plugger (1.1.4)
locale (2.1.4)
log4r (1.1.10)
logger (1.6.4)
logger (1.6.6)
logging (2.4.0)
little-plugger (~> 1.1)
multi_json (~> 1.14)
metadata-json-lint (4.1.0)
metadata-json-lint (4.2.0)
json-schema (>= 2.8, < 6.0)
semantic_puppet (~> 1.0)
spdx-licenses (~> 1.0)
method_source (1.1.0)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.1203)
mime-types-data (3.2025.0220)
minitar (0.12.1)
mixlib-install (3.12.30)
mixlib-shellout
Expand All @@ -178,7 +179,7 @@ GEM
uri
net-http-persistent (4.0.5)
connection_pool (~> 2.2)
net-scp (4.0.0)
net-scp (4.1.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-ssh (7.3.0)
net-ssh-gateway (2.0.0)
Expand All @@ -197,7 +198,7 @@ GEM
parallel (1.26.3)
parallel_tests (3.12.1)
parallel
parser (3.3.6.0)
parser (3.3.7.1)
ast (~> 2.4.1)
racc
pastel (0.8.0)
Expand All @@ -207,12 +208,11 @@ GEM
prime (0.1.3)
forwardable
singleton
pry (0.15.0)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (6.0.1)
puppet (8.10.0-universal-darwin)
CFPropertyList (>= 3.0.6, < 4)
puppet (8.10.0)
concurrent-ruby (~> 1.0)
deep_merge (~> 1.0)
facter (>= 4.3.0, < 5)
Expand All @@ -223,15 +223,14 @@ GEM
puppet-resource_api (~> 1.5)
scanf (~> 1.0)
semantic_puppet (~> 1.0)
puppet (8.10.0-x64-mingw32)
puppet (8.10.0-universal-darwin)
CFPropertyList (>= 3.0.6, < 4)
concurrent-ruby (~> 1.0)
deep_merge (~> 1.0)
facter (>= 4.3.0, < 5)
fast_gettext (>= 2.1, < 4)
ffi (>= 1.15.5, < 1.17.0, != 1.16.2, != 1.16.1, != 1.16.0)
getoptlong (~> 0.2.0)
locale (~> 2.1)
minitar (~> 0.9)
multi_json (~> 1.13)
puppet-resource_api (~> 1.5)
scanf (~> 1.0)
Expand Down Expand Up @@ -330,28 +329,22 @@ GEM
rainbow (3.1.1)
rake (13.2.1)
rb-readline (0.5.5)
regexp_parser (2.9.3)
regexp_parser (2.10.0)
reline (0.6.0)
io-console (~> 0.5)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rest-client (2.1.0-x64-mingw32)
ffi (~> 1.9)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
retryable (3.0.5)
rexml (3.4.0)
rgen (0.9.1)
rexml (3.4.1)
rgen (0.10.2)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.2)
rspec-core (3.13.3)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
Expand Down Expand Up @@ -383,7 +376,7 @@ GEM
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.37.0)
rubocop-ast (1.38.0)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
Expand All @@ -401,9 +394,9 @@ GEM
windows_error
rubyntlm (0.6.5)
base64
rubyzip (2.3.2)
rubyzip (2.4.1)
scanf (1.0.0)
semantic_puppet (1.1.0)
semantic_puppet (1.1.1)
serverspec (2.42.3)
multi_json
rspec (~> 3.0)
Expand All @@ -414,7 +407,7 @@ GEM
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-console (0.9.2)
simplecov-console (0.9.3)
ansi
simplecov
terminal-table
Expand Down Expand Up @@ -518,6 +511,7 @@ GEM
yard (0.9.36)

PLATFORMS
arm64-darwin-22
arm64-darwin-24
x64-mingw32

Expand Down
10 changes: 3 additions & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@
default: { $agent_full_version = $agent_version }
}

if $_agent_major_version != 5 and $_agent_major_version != 6 and $_agent_major_version != 7 {
fail("agent_major_version must be either 5, 6 or 7, not ${_agent_major_version}")
if $_agent_major_version != 6 and $_agent_major_version != 7 {
fail("agent_major_version must be either 6 or 7, not ${_agent_major_version}")
}

if ($facts['os']['name'] == 'Windows' and $windows_ddagentuser_name != undef) {
Expand All @@ -424,11 +424,7 @@
}

if $conf_dir == undef {
if $_agent_major_version == 5 {
$_conf_dir = $datadog_agent::params::legacy_conf_dir
} else {
$_conf_dir = $datadog_agent::params::conf_dir
}
$_conf_dir = $datadog_agent::params::conf_dir
} else {
$_conf_dir = $conf_dir
}
Expand Down
22 changes: 9 additions & 13 deletions manifests/integration.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,16 @@
# datadog_agent class, causing a dependency cycle. If using this class
# directly, you should define datadog_agent before datadog_agent::integration.

if $datadog_agent::_agent_major_version > 5 {
$dst_dir = "${datadog_agent::params::conf_dir}/${integration}.d"
$dst = "${dst_dir}/${$conf_file}.yaml"
if (! defined(File[$dst_dir])) {
file { $dst_dir:
ensure => directory,
owner => $datadog_agent::dd_user,
group => $datadog_agent::dd_group,
mode => $datadog_agent::params::permissions_directory,
before => File[$dst],
}
$dst_dir = "${datadog_agent::params::conf_dir}/${integration}.d"
$dst = "${dst_dir}/${$conf_file}.yaml"
if (! defined(File[$dst_dir])) {
file { $dst_dir:
ensure => directory,
owner => $datadog_agent::dd_user,
group => $datadog_agent::dd_group,
mode => $datadog_agent::params::permissions_directory,
before => File[$dst],
}
} else {
$dst = "${datadog_agent::params::legacy_conf_dir}/${integration}.yaml"
}

$file_ensure = $ensure ? { default => 'file', 'absent' => absent }
Expand Down
42 changes: 17 additions & 25 deletions manifests/integrations/activemq_xml.pp
Original file line number Diff line number Diff line change
Expand Up @@ -52,36 +52,28 @@
#
#
class datadog_agent::integrations::activemq_xml (
String $url = 'http://localhost:8161',
Boolean $supress_errors = false,
Optional[String] $username = undef,
Optional[String] $password = undef,
Array[String] $detailed_queues = [],
Array[String] $detailed_topics = [],
Array[String] $detailed_subscribers = [],
Optional[Array] $instances = undef,
String $url = 'http://localhost:8161',
Boolean $supress_errors = false,
Optional[String] $username = undef,
Optional[String] $password = undef,
Array[String] $detailed_queues = [],
Array[String] $detailed_topics = [],
Array[String] $detailed_subscribers = [],
Optional[Array] $instances = undef,
) inherits datadog_agent::params {
require datadog_agent

$legacy_dst = "${datadog_agent::params::legacy_conf_dir}/activemq_xml.yaml"
if $datadog_agent::_agent_major_version > 5 {
$dst_dir = "${datadog_agent::params::conf_dir}/activemq_xml.d"
file { $legacy_dst:
ensure => 'absent',
}
$dst_dir = "${datadog_agent::params::conf_dir}/activemq_xml.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"
} else {
$dst = $legacy_dst
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"

if !$instances and $url {
$_instances = [{
Expand Down
26 changes: 9 additions & 17 deletions manifests/integrations/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,17 @@
) inherits datadog_agent::params {
require datadog_agent

$legacy_dst = "${datadog_agent::params::legacy_conf_dir}/apache.yaml"
if $datadog_agent::_agent_major_version > 5 {
$dst_dir = "${datadog_agent::params::conf_dir}/apache.d"
file { $legacy_dst:
ensure => 'absent',
}
$dst_dir = "${datadog_agent::params::conf_dir}/apache.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"
} else {
$dst = $legacy_dst
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,
Expand Down
Loading