Defined Type: monit::check

Defined in:
manifests/check.pp

Overview

monit::check

This define is a facility used as entry point for tests defined in Hiera. See main class for reference.

Parameters:

  • ensure (Monit::Check::Ensure) (defaults to: 'present')

    Whether this check must be present or absent.

  • config (Hash[ String, Variant[Array, Hash, Integer, String] ]) (defaults to: {})

    Parameters for ‘monit::check::$type`. Empty parameters will be given the default values.

  • group (String) (defaults to: $name)

    Monit group.

  • tests (Monit::Check::Tests) (defaults to: [])

    Monit tests.

  • priority (String) (defaults to: '20')

    Used as a prefix for the filename generated. Load order doesn’t matter to Monit. This is just a facility to organize your checks by filename.

  • template (String) (defaults to: "monit/check/${type}.erb")

    Template used to generate the check file.

  • bundle (String) (defaults to: $name)

    Used to group checks by filename. All checks in the same bundle will be added to the same filename.

  • order (Integer) (defaults to: 0)

    Order of the check within the bundle filename.

  • type (Enum[ 'directory', 'fifo', 'file', 'filesystem', 'host', 'network', 'process', 'program', 'service', 'system' ])

    Type of check to perform. See ‘manifests/check/*.pp` for details.



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

define monit::check (
  Enum[
    'directory',
    'fifo',
    'file',
    'filesystem',
    'host',
    'network',
    'process',
    'program',
    'service',
    'system'
  ] $type,
  Monit::Check::Ensure $ensure = 'present',
  Hash[
    String,
    Variant[Array, Hash, Integer, String]
  ] $config                    = {},
  String $group                = $name,
  Monit::Check::Tests $tests   = [],
  String $priority             = '20',
  String $template             = "monit/check/${type}.erb",
  String $bundle               = $name,
  Integer $order               = 0,
) {
  $defaults = {
    'name'     => $name,
    'ensure'   => $ensure,
    'group'    => $group,
    'tests'    => $tests,
    'priority' => $priority,
    'bundle'   => $bundle,
    'order'    => $order,
  }
  $params = merge($config, $defaults)
  ensure_resource("monit::check::${type}", "${name}_${type}", $params)
}