Puppet Class: prometheus_cd::params

Summary

Class holds all parameters for the prometheus_cd module.

Overview

prometheus_cd::params.pp Module name: prometheus_cd Author: Arne Teuke (arne_teuke@confdroid.com)

Parameters:

  • reqpackage_prom (String) (defaults to: 'prometheus2')

    the prometheus package

  • reqpackage_ne (String) (defaults to: 'node_exporter')

    the node_exporter package

  • pkg_ensure (String) (defaults to: 'present')

    which version of the package to install

  • manage_prometheus (Boolean) (defaults to: false)

    whether to manage prometheus

  • manage_node_exporter (Boolean) (defaults to: false)

    whether to manage node exporter

  • ps_manage_fw (Boolean) (defaults to: false)

    whether to manage the firewall

  • ps_prom_host (String) (defaults to: 'prometheus.example.net')

    the fqdn of the prometheus server

  • ps_fw_prefix (String) (defaults to: '50')

    the firewall rule prefix

  • ps_main_port (String) (defaults to: '9090')

    the firewall main port for prometheus

  • ps_auth_user (String) (defaults to: 'changeme')

    the username for authentication

  • ps_auth_pass (String) (defaults to: 'changeme')

    the password for authentication

  • ps_retention_time (String) (defaults to: '15d')

    tsdb retention time

  • ps_retention_size (String) (defaults to: '20GB')

    tsdb retention size



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'manifests/params.pp', line 19

class prometheus_cd::params (

  # installation
  String $reqpackage_prom       = 'prometheus2',
  String $reqpackage_ne         = 'node_exporter',
  String $pkg_ensure            = 'present',

  # config logic
  Boolean $manage_prometheus    = false,
  Boolean $manage_node_exporter = false,
  Boolean $ps_manage_fw         = false,
  String $ps_prom_host          = 'prometheus.example.net',

  # firewall
  String $ps_fw_prefix          = '50',
  String $ps_main_port          = '9090',

  # auth
  String $ps_auth_user          = 'changeme',
  String $ps_auth_pass          = 'changeme',

  # storage
  String $ps_retention_time     = '15d',
  String $ps_retention_size     = '20GB',

) {
  # defaults
  $fqdn                   = $facts['networking']['fqdn']
  $domain                 = $facts['networking']['domain']
  $os_name                = $facts['os']['name']
  $os_release             = $facts['os']['release']['major']

  # dirs
  $ps_main_dir            = '/etc/prometheus'
  $ps_system_file_dir     = '/etc/systemd/system/prometheus.service.d'

  # files
  $ps_main_file           = "${ps_main_dir}/prometheus.yml"
  $ps_system_service_file = "${ps_system_file_dir}/override.conf"

  # services
  $ps_prom_service        = 'prometheus'
  $ps_ne_service          = 'node_exporter'

  # includes must be last
  include prometheus_cd::main::config
}