This file is indexed.

/usr/share/puppet/modules.available/sbitio-monit/manifests/check.pp is in puppet-module-sbitio-monit 1.0.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 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
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
66
# == Defined type: monit::check
#
# This define is a facility used as entry point for tests defined in Hiera.
# See main class for reference.
#
# === Parameters
#
# [*type*]
#   Type of check to perform. It supports all the primitive check types
#   supported by Monit and the 'service' compound check type.
#
# [*config*]
#   Hash of parameters for `monit::check::${type}`. Empty parameters
#   will be given the default values.
#
# [*group*]
#   Monit group.
#
# [*alerts*]
#   Array of Monit alerts.
#
# [*tests*]
#   Hash of Monit tests.
#
# [*priority*]
#   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*]
#   Used to group checks by filename. All checks in the same bundle will
#   be added to the same filename.
#
# [*order*]
#   Order of the check within the bundle filename.
#
define monit::check(
  $ensure   = present,
  $type     = undef,
  $config   = {},
  $group    = $name,
  $tests    = [],
  $priority = '20',
  $template = "monit/check/${type}.erb",
  $bundle   = $name,
  $order    = 0,
) {

  validate_re(
    $type,
    '^(directory|fifo|file|filesystem|host|process|program|service|system)$',
    "Unknown check type '${type}'."
  )
  validate_hash($config)

  $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)
}