Defined Type: monit::check::program

Defined in:
manifests/check/program.pp

Overview

monit::check::program

Implement Monit’s CHECK PROGRAM

Parameters:

  • path (Stdlib::Absolutepath)

    Path to the program to run. May include arguments.

  • template (String) (defaults to: 'monit/check/program.erb')

    Template used to generate the check file.

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

    Whether this check must be present or absent.

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

    Monit group.

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

    Service poll time.

  • alerts (Array[String]) (defaults to: [])

    Alert recipients (with event filters) to set.

  • noalerts (Array[String]) (defaults to: [])

    Alerts to disable for this check.

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

    Monit tests.

  • depends (Array[String]) (defaults to: [])

    Dependencies of this check on other checks.

  • 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.

  • 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.



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

define monit::check::program (
  # Check type specific.
  Stdlib::Absolutepath $path,
  String $template             = 'monit/check/program.erb',

  # Common parameters.
  Monit::Check::Ensure $ensure = 'present',
  String $group                = $name,
  Optional[String] $every      = undef,
  Array[String] $alerts        = [],
  Array[String] $noalerts      = [],
  Monit::Check::Tests $tests   = [],
  Array[String] $depends       = [],
  String $priority             = '20',
  String $bundle               = $name,
  Integer $order               = 0,
) {
  monit::check::instance { "${name}_instance":
    ensure   => $ensure,
    name     => $name,
    type     => 'program',
    header   => template($template),
    group    => $group,
    every    => $every,
    alerts   => $alerts,
    noalerts => $noalerts,
    tests    => $tests,
    depends  => $depends,
    priority => $priority,
    bundle   => $bundle,
    order    => $order,
  }
}