Puppet Class: redis::monitoring::nrpe

Defined in:
modules/redis/manifests/monitoring/nrpe.pp

Overview



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'modules/redis/manifests/monitoring/nrpe.pp', line 1

class redis::monitoring::nrpe {
    require_package('libredis-perl')

    file { '/usr/lib/nagios/plugins/check_redis':
        ensure => present,
        source => 'puppet:///modules/redis/check_redis',
        mode   => '0755',
    }

    $nrpe_command = '/usr/lib/nagios/plugins/nrpe_check_redis'
    file { $nrpe_command:
        ensure => present,
        source => 'puppet:///modules/redis/nrpe_check_redis.sh',
        mode   => '0755',
    }

    sudo::user { 'nagios_check_redis':
        ensure     => present,
        user       => 'nagios',
        privileges => ["ALL = NOPASSWD: ${nrpe_command}"],
        require    => File[$nrpe_command],
    }
}