Defined Type: confdroid_nrpe::commands::definitions

Defined in:
manifests/commands/definitions.pp

Summary

Populate command definitions through external puppet rules, i.e. from other modules.

Overview

confdroid_nrpe::commands::definitions.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com) different checks.

Parameters:

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

    Specify the check_command to use.

  • ne_cmd_path (String) (defaults to: '/usr/lib64/nagios/plugins/')

    The path to the command scripts, usually where the nagios_plugins are located. If you use your own scripts, specify the custom location including the trailing slash

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

    Specify the string of valid argument for the command , i.e. -w $ARG1$ -c $ARG2$. See the arguments in the man pages for the checks.

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

    Specify an optional comment for your command definition

  • ne_check_name (String) (defaults to: 'check_procs')

    Specify an optional name for the check, if you want to use a different name than the check_command. This is useful if you want to use the same check_command with different arguments, e.g. check_procs with different argument strings for



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'manifests/commands/definitions.pp', line 21

define confdroid_nrpe::commands::definitions (

  String $ne_check_name               = 'check_procs',
  Optional[String] $ne_check_cmd      = undef,
  String $ne_cmd_path                 = '/usr/lib64/nagios/plugins/',
  Optional[String] $ne_cmd_argstring  = undef,
  Optional[String] $ne_cmd_comment    = undef,

) {
  $ne_cmd_file      = $confdroid_nrpe::params::ne_cmd_file
  $ne_cmd_rule_erb  = $confdroid_nrpe::params::ne_cmd_rule_erb
  $ne_manage_cmds   = $confdroid_nrpe::params::ne_manage_cmds

  if $ne_manage_cmds == true {
    concat::fragment { $name:
      target  => $ne_cmd_file,
      content => template($ne_cmd_rule_erb),
    }
  }
}