2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'manifests/modules/metricbeat/elasticsearch.pp', line 2
class beats::modules::metricbeat::elasticsearch (
Boolean $enable,
Array[String] $hosts,
Hash[String, Any] $override = {},
) {
if $hosts =~ String {
$_hosts = [$hosts]
} else {
$_hosts = $hosts
}
$final = deep_merge({
'module' => 'elasticsearch',
'enabled' => $enable,
# "metricsets" => [
# "node",
# "node_stats",
# ],
'period' => '10s',
'hosts' => $_hosts,
#"username" => "user",
#"password" => "secret",
}, $override)
}
|