Puppet Class: profile::prometheus::node_local_crontabs
- Defined in:
- modules/profile/manifests/prometheus/node_local_crontabs.pp
Overview
SPDX-License-Identifier: Apache-2.0
Class: prometheus::node_local_crontabs
Periodically export local crontab information via node-exporter textfile collector. This is exclusively tailored for toolforge grid nodes.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'modules/profile/manifests/prometheus/node_local_crontabs.pp', line 7
class profile::prometheus::node_local_crontabs {
class { 'prometheus::node_local_crontabs': }
sudo::user { 'prometheus_sudo_for_local_crontab':
ensure => 'present',
user => 'prometheus',
privileges => [
'ALL=(root) NOPASSWD: /bin/ls -1 /var/spool/cron/crontabs/',
],
}
systemd::timer::job { 'prometheus-local-crontabs':
ensure => present,
description => 'Regular job to collect number of crontabs installed on this host',
user => 'prometheus',
command => '/usr/local/bin/prometheus-local-crontabs',
# Run every 5 minutes
interval => {'start' => 'OnCalendar', 'interval' => '*-*-* *:00/5:00'},
}
}
|