Puppet Class: prometheus::client::systemd

Defined in:
manifests/client/systemd.pp

Summary

Configure systemd exporter

Overview



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
# File 'manifests/client/systemd.pp', line 3

class prometheus::client::systemd {
  include prometheus

  package { 'prometheus-systemd-exporter': }

  -> file { '/etc/conf.d/prometheus-systemd-exporter':
    ensure  => file,
    content => 'SYSTEMD_EXPORTER_ARGS="--systemd.collector.enable-restart-count"',
  }

  -> service { 'prometheus-systemd-exporter':
    ensure => running,
    enable => true,
  }

  Configvault_Write { 'prometheus/systemd':
    source => '/etc/identifier',
    public => true,
  }

  firewall { '100 allow prometheus systemd metrics':
    source => $prometheus::server_ip,
    dport  => 9558,
    proto  => 'tcp',
    action => 'accept',
  }
}