6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'manifests/input/admon.pp', line 6
define splunk::input::admon ( $name,
$targetDc = undef,
$startingNode = undef,
$monitorSubtree = undef,
$disabled = undef,
$index = undef,
$printSchema = undef,
$baseline = undef
) {
include splunk
# Field Validations
if $monitorSubtree != undef and ($monitorSubtree != 0 and $monitorSubtree != 1) {
fail('\$monitorSubtree is not in [0|1].')
}
if $printSchema != undef and ($printSchema != 0 and $printSchema != 1) {
fail('\$printSchema is not in [0|1].')
}
if $disabled != undef and ($disabled != 0 and $disabled != 1) {
fail('\$disabled is not in [0|1].')
}
if $baseline != undef and ($baseline != 0 and $baseline != 1) {
fail('\$baseline is not in [0|1].')
}
realize Concat['inputs.conf']
concat::fragment { "admon-${title}":
target => 'inputs.conf',
content => template( 'splunk/inputs.conf/admon.erb' )
}
}
|