Files
confdroid_nrpe/manifests/commands/definitions.pp

35 lines
1.4 KiB
ObjectPascal
Raw Normal View History

2026-02-10 17:43:42 +01:00
## confdroid_nrpe::commands::definitions.pp
# Module name: confdroid_nrpe
# Author: 12ww1160 (12ww1160@ConfDroid.com)
2017-07-30 12:32:29 +01:00
# @summary Populate command definitions through external puppet rules, i.e.
# from other modules.
2025-05-12 16:58:52 +02:00
# @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
2017-07-30 12:32:29 +01:00
# the custom location **__including the trailing slash__**
2025-05-12 16:58:52 +02:00
# @param [String] ne_cmd_argstring Specify the string of valid argument for the command
2017-07-30 19:46:01 +01:00
# , i.e. -w $ARG1$ -c $ARG2$. See the arguments in the man pages for the
2017-07-30 12:32:29 +01:00
# checks.
2025-05-12 16:58:52 +02:00
# @param [String] ne_cmd_comment Specify an optional comment for your command
2017-07-30 13:17:19 +01:00
# definition
2017-07-28 16:52:39 +01:00
###############################################################################
2026-02-10 17:43:42 +01:00
define confdroid_nrpe::commands::definitions (
2017-07-28 16:52:39 +01:00
2025-05-12 16:58:52 +02:00
Optional[String] $ne_check_cmd = undef,
String $ne_cmd_path = '/usr/lib64/nagios/plugins/',
Optional[String] $ne_cmd_argstring = undef,
String $ne_cmd_comment = '',
2017-07-28 16:56:18 +01:00
2017-07-28 16:52:39 +01:00
) {
2026-02-10 17:43:42 +01:00
$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
2017-07-28 17:31:53 +01:00
if $ne_manage_cmds == true {
concat::fragment { $name:
2025-05-12 16:58:52 +02:00
target => $ne_cmd_file,
content => template($ne_cmd_rule_erb),
}
2017-07-30 12:32:29 +01:00
}
2017-07-28 16:52:39 +01:00
}