diff --git a/CHANGELOG.md b/CHANGELOG.md index aa666fc..52d21b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,26 @@ Changelog of Git Changelog.

No issue

+5c0374245dc1e72 Arne Teuke 2017-07-30 11:50:55 +

+

added test command

+ +

+7782b870bf31b9d Jenkins Server 2017-07-30 11:50:48 +

+

recommit for updates in build 42

+ +

+7a767e39dc3aa27 Arne Teuke 2017-07-30 11:42:09 +

+

fixed typo, added including clause to definitions

+ +

+501d59832c2f525 Jenkins Server 2017-07-30 11:42:02 +

+

recommit for updates in build 41

+ +

d9e6db5e0d5b277 Arne Teuke 2017-07-30 11:32:29

updated README, added defintions

diff --git a/REPOSTRUCTURE.md b/REPOSTRUCTURE.md index 6f3424b..75fc289 100644 --- a/REPOSTRUCTURE.md +++ b/REPOSTRUCTURE.md @@ -9,6 +9,7 @@ | | |-- full_list.js | | `-- jquery.js | |-- puppet_classes +| | |-- cd_nrpe_3A_3Acommands_3A_3Adefinition_rules.html | | |-- cd_nrpe_3A_3Acommands_3A_3Adefinitions.html | | |-- cd_nrpe_3A_3Afirewall_3A_3Aiptables.html | | |-- cd_nrpe_3A_3Amain_3A_3Aconfig.html @@ -60,4 +61,4 @@ |-- README.md `-- REPOSTRUCTURE.md -11 directories, 49 files +11 directories, 50 files diff --git a/doc/_index.html b/doc/_index.html index eac3ae8..26d55f9 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -171,7 +171,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index d40a22c..0ec7a80 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -217,6 +217,31 @@ 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. The +default NRPE installation comes with a few examples of such commands, which +are also included in this module. However, every environment is very +different in their requirements and Nagios via Puppet is all about the +ability to dynamicically set command arguments based on default variables / +overrides. For that reason no hard-coded commands are included, but instead +all commands are set via argument strings, where possible.

+ +

Defining commands is as simple as +that: +<code> +`cd_nrpe::commands::definitions` { +'check_users': + `ne_check_cmd` => +'check_users', + `ne_cmd_argstring` => '-w $ARG1$ -c +$ARG2$', + } +</code> +It is very recommendable to define such +commands within Puppet modules controlling services, so any node running +the particular service will automatically get the required check commands +defined as well.

+

SELINUX

All files and directories are configured with correct selinux context. If @@ -277,7 +302,7 @@ environments.

diff --git a/doc/index.html b/doc/index.html index b88e6a3..0607b51 100644 --- a/doc/index.html +++ b/doc/index.html @@ -217,6 +217,31 @@ 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. The +default NRPE installation comes with a few examples of such commands, which +are also included in this module. However, every environment is very +different in their requirements and Nagios via Puppet is all about the +ability to dynamicically set command arguments based on default variables / +overrides. For that reason no hard-coded commands are included, but instead +all commands are set via argument strings, where possible.

+ +

Defining commands is as simple as +that: +<code> +`cd_nrpe::commands::definitions` { +'check_users': + `ne_check_cmd` => +'check_users', + `ne_cmd_argstring` => '-w $ARG1$ -c +$ARG2$', + } +</code> +It is very recommendable to define such +commands within Puppet modules controlling services, so any node running +the particular service will automatically get the required check commands +defined as well.

+

SELINUX

All files and directories are configured with correct selinux context. If @@ -277,7 +302,7 @@ environments.

diff --git a/doc/puppet_classes/cd_nrpe.html b/doc/puppet_classes/cd_nrpe.html index a7a3556..d312bff 100644 --- a/doc/puppet_classes/cd_nrpe.html +++ b/doc/puppet_classes/cd_nrpe.html @@ -140,7 +140,7 @@ class cd_nrpe { diff --git a/doc/puppet_classes/cd_nrpe_3A_3Acommands_3A_3Adefinition_rules.html b/doc/puppet_classes/cd_nrpe_3A_3Acommands_3A_3Adefinition_rules.html index a26e510..1d950bf 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Acommands_3A_3Adefinition_rules.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Acommands_3A_3Adefinition_rules.html @@ -120,6 +120,17 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

+
+

Examples:

+ + +
cd_nrpe::commands::definitions { 'check_users':
+  ne_check_cmd      =>  'check_users',
+  ne_cmd_argstring  =>  '-w $ARG1$ -c $ARG2$',
+}
+ +
+
@@ -128,11 +139,6 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

 
 
-23
-24
-25
-26
-27
 28
 29
 30
@@ -161,10 +167,38 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

53 54 55 -56
+56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 @@ -207,7 +264,7 @@ class cd_nrpe::commands::definition_rules ( diff --git a/doc/puppet_classes/cd_nrpe_3A_3Afirewall_3A_3Aiptables.html b/doc/puppet_classes/cd_nrpe_3A_3Afirewall_3A_3Aiptables.html index c5c3e0f..4f19ccf 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Afirewall_3A_3Aiptables.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Afirewall_3A_3Aiptables.html @@ -165,7 +165,7 @@ class cd_nrpe::firewall::iptables ( diff --git a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Aconfig.html index b1eb0c0..6af2ca9 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Aconfig.html @@ -154,7 +154,7 @@ class cd_nrpe::main::config ( diff --git a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Adirs.html index 742c5e0..fc36c8e 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Adirs.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Adirs.html @@ -205,7 +205,7 @@ class cd_nrpe::main::dirs ( diff --git a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Afiles.html index 28e6a2b..9dda5ea 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Afiles.html @@ -217,7 +217,7 @@ class cd_nrpe::main::files ( diff --git a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Ainstall.html index 05205f0..acc08e8 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Ainstall.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Ainstall.html @@ -160,7 +160,7 @@ class cd_nrpe::main::install ( diff --git a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Aservice.html b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Aservice.html index 9a58c18..f659d1b 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Aservice.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Aservice.html @@ -183,7 +183,7 @@ class cd_nrpe::main::service ( diff --git a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Auser.html b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Auser.html index 61b4987..1f16080 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Auser.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Amain_3A_3Auser.html @@ -193,7 +193,7 @@ class cd_nrpe::main::user ( diff --git a/doc/puppet_classes/cd_nrpe_3A_3Aparams.html b/doc/puppet_classes/cd_nrpe_3A_3Aparams.html index cd82ecb..2eb2c37 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Aparams.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Aparams.html @@ -1059,7 +1059,7 @@ $ne_cmd_rule_erb = 'cd_nrpe/cmd_rule.erb' diff --git a/doc/puppet_defined_types/cd_nrpe_3A_3Acommands_3A_3Adefinitions.html b/doc/puppet_defined_types/cd_nrpe_3A_3Acommands_3A_3Adefinitions.html index 78443bd..dfa3e06 100644 --- a/doc/puppet_defined_types/cd_nrpe_3A_3Acommands_3A_3Adefinitions.html +++ b/doc/puppet_defined_types/cd_nrpe_3A_3Acommands_3A_3Adefinitions.html @@ -238,7 +238,7 @@ $ne_manage_cmds = $::cd_nrpe::params::ne_manage_cmds diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index b8e97c8..0edab9c 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@
-
# File 'manifests/commands/definition_rules.pp', line 23
+        
# File 'manifests/commands/definition_rules.pp', line 28
 
 class cd_nrpe::commands::definition_rules (
 
@@ -197,7 +231,30 @@ 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$',
+    }
 
+    cd_nrpe::commands::definitions { 'check_load':
+      ne_check_cmd      =>  'check_load',
+      ne_cmd_argstring  =>  '-w $ARG1$ -c $ARG2$',
+    }
+
+    cd_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':
+      ne_check_cmd      =>  'check_procs',
+      ne_cmd_argstring  =>  '-w $ARG1$ -c $ARG2$ -s $ARG3$',
+    }
+
+    cd_nrpe::commands::definitions { 'check_swap':
+      ne_check_cmd      =>  'check_swap',
+      ne_cmd_argstring  =>  '-w $ARG1$ -c $ARG2$',
+    }
   }
 }