Skip to content

Commit 15a865e

Browse files
arkpoahtruthbk
authored andcommitted
Agent6 dynamic cmd port (DataDog#473)
* use dd_user/group init var * Dynamic cmd_port for agent 6
1 parent 7906865 commit 15a865e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

manifests/init.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@
180180
# $container_collect_all
181181
# Boolean to enable logs collection for all containers
182182
# Boolean. Default: false
183+
# $cmd_port
184+
# The port on which the IPC api listens
185+
# Integer. Default: 5001
183186
#
184187
# Actions:
185188
#
@@ -264,6 +267,7 @@
264267
$sd_template_dir = '',
265268
$sd_jmx_enable = false,
266269
$consul_token = '',
270+
$cmd_port = 5001,
267271
$agent5_enable = $datadog_agent::params::agent5_enable,
268272
$conf_dir = $datadog_agent::params::conf_dir,
269273
$conf6_dir = $datadog_agent::params::conf6_dir,
@@ -373,6 +377,7 @@
373377
validate_legacy(String, 'validate_string', $agent5_repo_uri)
374378
validate_legacy(String, 'validate_string', $agent6_repo_uri)
375379
validate_legacy(String, 'validate_string', $apt_release)
380+
validate_legacy(Integer, 'validate_integer', $cmd_port)
376381

377382
if $hiera_tags {
378383
$local_tags = lookup({ 'name' => 'datadog_agent::tags', 'merge' => 'unique', 'default_value' => []})
@@ -618,7 +623,7 @@
618623
$_agent_config = {
619624
'api_key' => $api_key,
620625
'dd_url' => $dd_url,
621-
'cmd_port' => 5001,
626+
'cmd_port' => $cmd_port,
622627
'collect_ec2_tags' => $collect_ec2_tags,
623628
'conf_path' => $datadog_agent::params::conf6_dir,
624629
'enable_metadata_collection' => $collect_instance_metadata,

0 commit comments

Comments
 (0)