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
37
38
39
40
41
42
43
|
# File 'manifests/input/winnetmon.pp', line 6
define splunk::input::winnetmon ( $name,
$remoteAddress = undef,
$process = undef,
$user = undef,
$addressFamily = undef,
$packetType = undef,
$direction = undef,
$protocol = undef,
$readInterval = undef,
$driverBufferSize = undef,
$userBufferSize = undef,
$mode = undef,
$multikvMaxEventCount = undef,
$multikvMaxTimeMs = undef,
$disabled = undef,
$index = undef
) {
include splunk
$_addressFamily = any2array($addressFamily)
$_packetType = any2array($packetType)
$_direction = any2array($direction)
$_protocol = any2array($protocol)
# Field Validations
if $disabled != undef and ($disabled != 0 and $disabled != 1) {
fail('\$disabled is not in [0|1].')
}
if $mode != undef {
validate_re($mode, '^single$|^multikv$')
}
realize Concat['inputs.conf']
concat::fragment { "winNetMon-${title}":
target => 'inputs.conf',
content => template( 'splunk/inputs.conf/winnetmon.erb' )
}
}
|