From 5c0374245dc1e72f9b52117ce2e859d2c335663f Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Sun, 30 Jul 2017 12:50:55 +0100 Subject: [PATCH] added test command --- README.md | 2 ++ manifests/commands/definition_rules.pp | 10 ++++++++++ templates/cmd_head.erb | 3 +-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea45767..0585dd1 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,8 @@ There are currently no mandatory parameters, i.e. the module will function right * `$ne_include_selinux` : Whether to manage selinux exception rules. Defaults to `true`. ### Managing Check Commands +In order to connect a Nagios monitoring server to clients through NRPE, you must define commands and the desired argument strings on the clients. + ### SELINUX All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored. diff --git a/manifests/commands/definition_rules.pp b/manifests/commands/definition_rules.pp index 108462b..9c521e8 100644 --- a/manifests/commands/definition_rules.pp +++ b/manifests/commands/definition_rules.pp @@ -19,6 +19,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # @summary manage command definitions via define and Puppet rules. +# @example +# cd_nrpe::commands::definitions { 'check_users': +# ne_check_cmd => 'check_users', +# ne_cmd_argstring => '-w $ARG1$ -c $ARG2$', +# } ############################################################################### class cd_nrpe::commands::definition_rules ( @@ -51,6 +56,11 @@ class cd_nrpe::commands::definition_rules ( # basic example rules + cd_nrpe::commands::definitions { 'check_users': + ne_check_cmd => 'check_users', + ne_cmd_argstring => '-w $ARG1$ -c $ARG2$', + } + } } diff --git a/templates/cmd_head.erb b/templates/cmd_head.erb index 10d521f..8399eed 100644 --- a/templates/cmd_head.erb +++ b/templates/cmd_head.erb @@ -1,4 +1,3 @@ ################################################################################ -########## commandsmds.cfg managed by Puppet ########## -########## manual changes will be orverwritten ########## +### commands.cfg managed by Puppet | manual changes will be overwritten ### ################################################################################