Puppet Class: puppetmaster::ca_monitoring
- Defined in:
- modules/puppetmaster/manifests/ca_monitoring.pp
Summary
generate Prometheus metrics about Puppet CA stateOverview
SPDX-License-Identifier: Apache-2.0
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 |
# File 'modules/puppetmaster/manifests/ca_monitoring.pp', line 3
class puppetmaster::ca_monitoring (
Stdlib::Unixpath $ca_root,
Wmflib::Ensure $ensure = present,
) {
ensure_packages([
'python3-cryptography',
'python3-prometheus-client',
])
file { '/usr/local/sbin/prometheus-puppet-ca-exporter':
ensure => file,
source => 'puppet:///modules/puppetmaster/ca_monitoring/prometheus-puppet-ca-exporter.py',
owner => 'root',
group => 'root',
mode => '0544',
}
systemd::timer::job { 'prometheus-puppet-ca-exporter':
ensure => $ensure,
user => 'root',
description => 'exports Puppet CA data as Prometheus metrics',
command => "/usr/local/sbin/prometheus-puppet-ca-exporter --outfile /var/lib/prometheus/node.d/puppet-ca.prom --ca-path ${ca_root}",
interval => {'start' => 'OnUnitInactiveSec', 'interval' => '5m'},
}
}
|