Skip to content

Commit

Permalink
Add configuration for deploymentclient.conf with 'target-broker:deplo…
Browse files Browse the repository at this point in the history
…ymentServer' and 'targetUri::'
  • Loading branch information
thierry-thierry committed Jan 13, 2025
1 parent acbd76e commit 31431e8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manifests/forwarder.pp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
# *Optional* If set to true, web.conf will be purged of configuration that is
# no longer managed by the `splunk_web` type.
#
# @param forwarder_deploymentclient
# Used to override the default `forwarder_deploymentclient` type defined in splunk::params.
#
# @param forwarder_input
# Used to override the default `forwarder_input` type defined in splunk::params.
#
Expand Down Expand Up @@ -192,6 +195,7 @@
Boolean $purge_props = false,
Boolean $purge_transforms = false,
Boolean $purge_web = false,
Hash $forwarder_deploymentclient = $splunk::params::forwarder_deploymentclient,
Hash $forwarder_output = $splunk::params::forwarder_output,
Hash $forwarder_input = $splunk::params::forwarder_input,
Boolean $manage_password = $splunk::params::manage_password,
Expand Down
8 changes: 8 additions & 0 deletions manifests/forwarder/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@
tag => 'splunk_forwarder',
}

$splunk::forwarder::forwarder_deploymentclient.each | String $name, Hash $options| {
splunkforwarder_deploymentclient { $name:
section => $options['section'],
setting => $options['setting'],
value => $options['value'],
tag => 'splunk_forwarder',
}
}
$splunk::forwarder::forwarder_input.each | String $name, Hash $options| {
splunkforwarder_input { $name:
section => $options['section'],
Expand Down
8 changes: 8 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,14 @@
}
# default splunk agent settings in a hash so that the cya be easily parsed to other classes

$forwarder_deploymentclient = {
'target-broker_targetUri' => {
section => 'target-broker:deploymentServer',
setting => 'targetUri',
value => "${server}:${logging_port}",
tag => 'splunk_forwarder',
},
}
$forwarder_output = {
'tcpout_defaultgroup' => {
section => 'default',
Expand Down

0 comments on commit 31431e8

Please sign in to comment.