1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'manifests/init.pp', line 1
class prometheus(
String $systemd_path = '/etc/systemd/system',
String $namespace = 'monitoring',
Optional[Enum['etcd','master','worker']] $role = $::prometheus::params::role,
$etcd_cluster = $::prometheus::params::etcd_cluster,
Integer[1025,65535] $etcd_k8s_main_port = $::prometheus::params::etcd_k8s_main_port,
Integer[1025,65535] $etcd_k8s_events_port = $::prometheus::params::etcd_k8s_events_port,
Integer[1024,65535] $etcd_overlay_port = $::prometheus::params::etcd_overlay_port,
Boolean $external_scrape_targets_only = false,
) inherits ::prometheus::params
{
if $role == 'master' {
include ::prometheus::server
include ::prometheus::blackbox_exporter_etcd
include ::prometheus::node_exporter
if ! $external_scrape_targets_only {
include ::prometheus::kube_state_metrics
include ::prometheus::blackbox_exporter
}
}
if $role == 'etcd' {
include ::prometheus::node_exporter
include ::prometheus::blackbox_exporter_etcd
}
}
|