Puppet Class: check_mk::agent

Inherited by:
check_mk::agent::config
check_mk::agent::install
Defined in:
manifests/agent.pp

Summary

Configures and install the check_mk agent.

Overview

Class: check_mk::agent

Parameters:

  • filestore (Optional[String]) (defaults to: undef)

    The location where the installation file can be found

  • host_tags (Optional[Array]) (defaults to: undef)

    Tags that needs to be added to the node if resource export is enabled.

  • workspace (Stdlib::Absolutepath) (defaults to: '/root/check_mk')

    Temp folder where the installation file will be placed.

  • package (Optional[String]) (defaults to: 'check-mk-agent')

    The package name to be installed.

  • package_ensure (String[1]) (defaults to: 'present')

    The ‘ensure` value to use when installing the agent from a package repository, (when `filestore` is not set). This option can be used to install a specific package version.

  • mrpe_checks (Hash) (defaults to: {})

    A hash containing mrpe command that will be passed to the mrpe defined type.

  • encryption_secret (Optional[String[1]]) (defaults to: undef)

    A secret that will be used to encrypt communication with the master.

  • config_dir (Stdlib::Absolutepath) (defaults to: '/etc/check_mk')

    The config directory for the agent.

  • use_xinetd (Boolean) (defaults to: !fact('systemd'))

    Configure the service using the older xinetd approach. Defaults to true on systems missing systemd, and false otherwise.

  • check_mk_xinetd_path (Stdlib::Absolutepath) (defaults to: '/etc/xinetd.d/check_mk')

    The path to the xinetd.d config file for check_mk

  • ip_whitelist (Array[Stdlib::IP::Address]) (defaults to: [])

    The list of IP addresses that are allowed to retrieve check_mk data. (Note that localhost is always allowed to connect.) By default any IP can connect.

  • user (String[1]) (defaults to: 'root')

    The user that the agent runs as.

  • group (String[1]) (defaults to: $user)

    The group that the agent runs as.

  • port (Stdlib::Port) (defaults to: 6556)

    The port the check_mk agent listens on.

  • server_dir (Stdlib::Absolutepath) (defaults to: '/usr/bin')

    The directory in which the check_mk_agent executable is located.

  • use_cache (Boolean) (defaults to: false)

    Whether or not to cache the results - useful with redundant monitoring server setups.

  • service_name (Optional[String[1]]) (defaults to: 'check_mk')


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
# File 'manifests/agent.pp', line 20

class check_mk::agent (
  Optional[String] $filestore = undef,
  Optional[Array] $host_tags = undef,
  Stdlib::Absolutepath $workspace = '/root/check_mk',
  Optional[String] $package = 'check-mk-agent',
  String[1] $package_ensure = 'present',
  Optional[String[1]] $service_name = 'check_mk',
  Hash $mrpe_checks = {},
  Optional[String[1]] $encryption_secret = undef,
  Boolean $use_xinetd = !fact('systemd'),
  Stdlib::Absolutepath $check_mk_xinetd_path = '/etc/xinetd.d/check_mk',
  Array[Stdlib::IP::Address] $ip_whitelist = [],
  Stdlib::Absolutepath $server_dir = '/usr/bin',
  Boolean $use_cache = false,
  Stdlib::Port $port = 6556,
  String[1] $user = 'root',
  String[1] $group = $user,
  Stdlib::Absolutepath $config_dir = '/etc/check_mk',
) {
  include check_mk::agent::install
  include check_mk::agent::config
  include check_mk::agent::service
  Class['check_mk::agent::install']
  -> Class['check_mk::agent::config']
  ~> Class['check_mk::agent::service']

  @@check_mk::host { $facts['networking']['fqdn']:
    host_tags => $host_tags,
  }

  $mrpe_checks.each | String $key, Hash $attrs| {
    check_mk::agent::mrpe { $key:
      * => $attrs,
    }
  }
}