Puppet Class: bacula::director::prometheus_exporter

Defined in:
modules/bacula/manifests/director/prometheus_exporter.pp

Overview

Parameters:

  • port (Any) (defaults to: '9133')


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'modules/bacula/manifests/director/prometheus_exporter.pp', line 1

class bacula::director::prometheus_exporter(
  $port = '9133',
) {
    require_package('python3-prometheus-client')
    file { '/usr/local/bin/prometheus-bacula-exporter.py':
        ensure => file,
        source => 'puppet:///modules/bacula/prometheus-bacula-exporter.py',
        owner  => 'bacula',
        group  => 'bacula',
        mode   => '0554',
        notify => Service['prometheus-bacula-exporter'],
    }
    systemd::service { 'prometheus-bacula-exporter':
        ensure  => present,
        restart => true,
        content => systemd_template('prometheus-bacula-exporter'),
        require => File['/usr/local/bin/prometheus-bacula-exporter.py'],
    }
}