Puppet Class: profile::poolcounter

Defined in:
modules/profile/manifests/poolcounter.pp

Overview

Parameters:

  • exporter_port (Any) (defaults to: lookup('profile::poolcounter::exporter_port'))


1
2
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
28
29
30
31
32
33
34
35
36
# File 'modules/profile/manifests/poolcounter.pp', line 1

class profile::poolcounter(
    $exporter_port = lookup('profile::poolcounter::exporter_port'),
) {
    class {'::poolcounter' : }

    # Process running
    nrpe::monitor_service { 'poolcounterd':
        description  => 'poolcounter',
        nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:3 -C poolcounterd',
        notes_url    => 'https://www.mediawiki.org/wiki/PoolCounter',
    }

    # TCP port 7531 reacheable
    monitoring::service { 'poolcounterd_port_7531':
        description   => 'Poolcounter connection',
        check_command => 'check_tcp!7531',
        notes_url     => 'https://www.mediawiki.org/wiki/PoolCounter',
    }

    # firewalling
    ferm::service { 'poolcounterd':
        proto   => 'tcp',
        port    => '7531',
        srange  => '$DOMAIN_NETWORKS',
        notrack => true,
    }

    ensure_packages('poolcounter-prometheus-exporter')

    systemd::service { 'poolcounter-prometheus-exporter':
        ensure  => 'present',
        content => systemd_template('poolcounter-prometheus-exporter'),
        require => Package['poolcounter-prometheus-exporter'],
        restart => true,
    }
}