Puppet Class: profile::prometheus::node_local_crontabs

Defined in:
modules/profile/manifests/prometheus/node_local_crontabs.pp

Overview

Class: prometheus::node_local_crontabs

Periodically export local crontab information via node-exporter textfile collector.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'modules/profile/manifests/prometheus/node_local_crontabs.pp', line 5

class profile::prometheus::node_local_crontabs {
    class { 'prometheus::node_local_crontabs': }

    # Collect every 5 minutes
    cron { 'prometheus_local_crontabs':
        ensure  => 'present',
        user    => 'prometheus',
        minute  => '*/5',
        command => '/usr/local/bin/prometheus-local-crontabs',
    }

    sudo::user { 'prometheus_sudo_for_local_crontab':
        ensure     => 'present',
        user       => 'prometheus',
        privileges => [
            'ALL=(root) NOPASSWD: /bin/ls -1 /var/spool/cron/crontabs/',
        ],
    }
}