OP#429 initial commit after fork

This commit is contained in:
2026-02-10 17:43:42 +01:00
parent 7fdb796516
commit 185cce3a89
15 changed files with 139 additions and 117 deletions

View File

@@ -1,19 +1,19 @@
## cd_nrpe::commands::definition_rules.pp
# Module name: cd_nrpe
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
## confdroid_nrpe::commands::definition_rules.pp
# Module name: confdroid_nrpe
# Author: 12ww1160 (12ww1160@ConfDroid.com)
# @summary manage command definitions via define and Puppet rules.
# @example
# cd_nrpe::commands::definitions { 'check_users':
# confdroid_nrpe::commands::definitions { 'check_users':
# ne_check_cmd => 'check_users',
# ne_cmd_argstring => '-w $ARG1$ -c $ARG2$',
# ne_cmd_comment => 'check the amount of user logged in locally',
# }
###############################################################################
class cd_nrpe::commands::definition_rules (
class confdroid_nrpe::commands::definition_rules (
) inherits cd_nrpe::params {
) inherits confdroid_nrpe::params {
if $ne_manage_cmds == true {
require cd_nrpe::main::files
require confdroid_nrpe::main::files
# manage the commands.cfg file
@@ -40,28 +40,28 @@ class cd_nrpe::commands::definition_rules (
# basic example rules
cd_nrpe::commands::definitions { 'check_users':
confdroid_nrpe::commands::definitions { 'check_users':
ne_check_cmd => 'check_users',
ne_cmd_argstring => '-w $ARG1$ -c $ARG2$',
ne_cmd_comment => 'check the amount of user logged in locally',
}
cd_nrpe::commands::definitions { 'check_load':
confdroid_nrpe::commands::definitions { 'check_load':
ne_check_cmd => 'check_load',
ne_cmd_argstring => '-w $ARG1$ -c $ARG2$',
}
cd_nrpe::commands::definitions { 'check_disk':
confdroid_nrpe::commands::definitions { 'check_disk':
ne_check_cmd => 'check_disk',
ne_cmd_argstring => '-w $ARG1$ -c $ARG2$ -p $ARG3$',
}
cd_nrpe::commands::definitions { 'check_procs':
confdroid_nrpe::commands::definitions { 'check_procs':
ne_check_cmd => 'check_procs',
ne_cmd_argstring => '-w $ARG1$ -c $ARG2$ -s $ARG3$',
}
cd_nrpe::commands::definitions { 'check_swap':
confdroid_nrpe::commands::definitions { 'check_swap':
ne_check_cmd => 'check_swap',
ne_cmd_argstring => '-w $ARG1$ -c $ARG2$',
}

View File

@@ -1,6 +1,6 @@
## cd_nrpe::commands::definitions.pp
# Module name: cd_nrpe
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
## confdroid_nrpe::commands::definitions.pp
# Module name: confdroid_nrpe
# Author: 12ww1160 (12ww1160@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.
@@ -13,7 +13,7 @@
# @param [String] ne_cmd_comment Specify an optional comment for your command
# definition
###############################################################################
define cd_nrpe::commands::definitions (
define confdroid_nrpe::commands::definitions (
Optional[String] $ne_check_cmd = undef,
String $ne_cmd_path = '/usr/lib64/nagios/plugins/',
@@ -21,9 +21,9 @@ define cd_nrpe::commands::definitions (
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
$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: