Defined Type: telegraf::input
- Defined in:
-
manifests/input.pp
Summary
A Puppet wrapper for discrete Telegraf input files
Overview
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'manifests/input.pp', line 8
define telegraf::input (
String $plugin_type = $name,
Array $options = [],
Enum['present', 'absent'] $ensure = 'present',
) {
include telegraf
$_ensure = $telegraf::ensure ? {
'absent' => 'absent',
default => $ensure,
}
file { "${telegraf::config_folder}/${name}.conf":
ensure => $_ensure,
content => stdlib::to_toml({ 'inputs'=> { $plugin_type=> $options } }),
require => Class['telegraf::config'],
notify => Class['telegraf::service'],
}
}
|