35 lines
1.4 KiB
Puppet
35 lines
1.4 KiB
Puppet
## cd_nrpe::commands::definitions.pp
|
|
# Module name: cd_nrpe
|
|
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
|
|
# @summary Populate command definitions through external puppet rules, i.e.
|
|
# from other modules.
|
|
# @param [String] ne_check_cmd Specify the check_command to use.
|
|
# @param [String] ne_cmd_path 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__**
|
|
# @param [String] ne_cmd_argstring 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.
|
|
# @param [String] ne_cmd_comment Specify an optional comment for your command
|
|
# definition
|
|
###############################################################################
|
|
define cd_nrpe::commands::definitions (
|
|
|
|
Optional[String] $ne_check_cmd = undef,
|
|
String $ne_cmd_path = '/usr/lib64/nagios/plugins/',
|
|
Optional[String] $ne_cmd_argstring = undef,
|
|
String $ne_cmd_comment = '',
|
|
|
|
) {
|
|
$ne_cmd_file = $cd_nrpe::params::ne_cmd_file
|
|
$ne_cmd_rule_erb = $cd_nrpe::params::ne_cmd_rule_erb
|
|
$ne_manage_cmds = $cd_nrpe::params::ne_manage_cmds
|
|
|
|
if $ne_manage_cmds == true {
|
|
concat::fragment { $name:
|
|
target => $ne_cmd_file,
|
|
content => template($ne_cmd_rule_erb),
|
|
}
|
|
}
|
|
}
|