Puppet Class: ganeti::prometheus

Defined in:
modules/ganeti/manifests/prometheus.pp

Overview

Parameters:



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
# File 'modules/ganeti/manifests/prometheus.pp', line 7

class ganeti::prometheus(
    String $rapi_endpoint,
    String $rapi_ro_user,
    String $rapi_ro_password,
) {
    ensure_packages('prometheus-ganeti-exporter')

    firewall::service {'ganeti-prometheus-exporter':
        proto    => 'tcp',
        port     => 8080,
        src_sets => ['PRODUCTION_NETWORKS'],
    }

    # Configuration files for Ganeti Prometheus exporter
    file { '/etc/ganeti/prometheus.ini':
        ensure  => present,
        owner   => 'prometheus',
        group   => 'prometheus',
        mode    => '0400',
        content => template('ganeti/prometheus-collector.erb')
    }

    service {'prometheus-ganeti-exporter':
        ensure => running,
    }

    profile::auto_restarts::service { 'prometheus-ganeti-exporter': }
}