12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'modules/prometheus/manifests/redis_exporter_config.pp', line 12
define prometheus::redis_exporter_config(
String $dest,
String $class_name,
Hash $labels = {},
) {
$_class_name = wmflib::resource::capitalize($class_name)
$pql = @("PQL")
resources[certname, parameters] {
type = "Prometheus::Redis_exporter" and
nodes { resources { type = "Class" and title = "${_class_name}" } }
order by certname
}
| PQL
$resources = wmflib::puppetdb_query($pql)
$site_clusters = wmflib::get_clusters({'site' => [$::site]})
file { $dest:
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
content => template('prometheus/redis_exporter_config.erb'),
}
}
|