Skip to content

Commit 5e12533

Browse files
committed
add options to add agent config
1 parent e164eae commit 5e12533

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

manifests/config.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
'logfile_rotation_max_archives' => $telegraf::logfile_rotation_max_archives,
2323
'debug' => $telegraf::debug,
2424
'quiet' => $telegraf::quiet,
25-
}
25+
} + $telegraf::agent_extra_config
2626
$config = stdlib::to_toml({ 'global_tags' => $telegraf::global_tags, 'agent' => $agent, 'outputs' => $telegraf::outputs, 'inputs' => $telegraf::inputs })
2727
file { $telegraf::config_file:
2828
ensure => $telegraf::ensure_file,

manifests/init.pp

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787
Boolean $service_enable = $telegraf::params::service_enable,
8888
String $service_ensure = $telegraf::params::service_ensure,
8989
Array $install_options = $telegraf::params::install_options,
90+
91+
Hash $agent_extra_config = $telegraf::params::agent_extra_config,
9092
) inherits telegraf::params {
9193
$service_hasstatus = $telegraf::params::service_hasstatus
9294
$service_restart = $telegraf::params::service_restart

manifests/params.pp

+2
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@
129129
$repo_type = 'stable'
130130
$windows_package_url = 'https://chocolatey.org/api/v2/'
131131

132+
$agent_extra_config = {}
133+
132134
$outputs = {
133135
'influxdb' => [
134136
{

0 commit comments

Comments
 (0)