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

No issue

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

+

updated README, added defintions

+ +

+3f047c24ddbd6ed Jenkins Server 2017-07-30 11:32:22 +

+

recommit for updates in build 40

+ +

93c4d60d239af95 Arne Teuke 2017-07-28 18:49:03

updated parameter

diff --git a/README.md b/README.md index 3257254..ea45767 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ NRPE allows monitoring tools like NAGIOS or ICINGA to connect to clients for mon `cd_nrpe` is a fully parameterized Puppet module to automate NRPE installation and configuration. - ### WARNING `**__!!! Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previuos configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production!!! __**` @@ -39,6 +38,7 @@ CONFIGURATION * manage configuration files through parameters: * nrpe.conf * nrpe.cfg + * commands.cfg (optional) * manage iptables (optionals ) SERVICE @@ -74,11 +74,10 @@ See [more details about class deployment on Confdroid.com](https://confdroid.com ### Parameters -The following parameters are editable via params.pp or through ENC (**__recommended__**). Values changed will take immediate effect at next puppet run. Services will be restarted where neccessary. +The following parameters are editable via params.pp or through ENC (**__recommended__**). Values changed will take immediate effect at next puppet run. Services will be restarted where neccessary. If you want to override parameters, the [module must be specifically declared to hosts when using ENC](#through-foreman). ### Mandatory Parameters - There are currently no mandatory parameters, i.e. the module will function right out of box as is. ### Optional Parameters diff --git a/REPOSTRUCTURE.md b/REPOSTRUCTURE.md index 6a2728d..6f3424b 100644 --- a/REPOSTRUCTURE.md +++ b/REPOSTRUCTURE.md @@ -9,6 +9,7 @@ | | |-- full_list.js | | `-- jquery.js | |-- puppet_classes +| | |-- cd_nrpe_3A_3Acommands_3A_3Adefinitions.html | | |-- cd_nrpe_3A_3Afirewall_3A_3Aiptables.html | | |-- cd_nrpe_3A_3Amain_3A_3Aconfig.html | | |-- cd_nrpe_3A_3Amain_3A_3Adirs.html @@ -59,4 +60,4 @@ |-- README.md `-- REPOSTRUCTURE.md -11 directories, 48 files +11 directories, 49 files diff --git a/doc/_index.html b/doc/_index.html index a8ac6d3..eac3ae8 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -74,7 +74,7 @@
  • - cd_nrpe::commands::definitions + cd_nrpe::commands::definition_rules
  • @@ -171,7 +171,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index ef75084..d40a22c 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -132,8 +132,9 @@ structure (file system permissions, selinux context) through parameters manage configuration files through parameters: * nrpe.conf * nrpe.cfg -* -manage iptables (optionals )

    + * +commands.cfg (optional) +* manage iptables (optionals )

    SERVICE * manage NRPE service

    @@ -192,7 +193,9 @@ details about class deployment on Confdroid.com.

    The following parameters are editable via params.pp or through ENC (recommended). Values changed will take immediate effect -at next puppet run. Services will be restarted where neccessary.

    +at next puppet run. Services will be restarted where neccessary. If you +want to override parameters, the module must be +specifically declared to hosts when using ENC.

    Mandatory Parameters

    @@ -274,7 +277,7 @@ environments.

    diff --git a/doc/index.html b/doc/index.html index 2859e90..b88e6a3 100644 --- a/doc/index.html +++ b/doc/index.html @@ -132,8 +132,9 @@ structure (file system permissions, selinux context) through parameters manage configuration files through parameters: * nrpe.conf * nrpe.cfg -* -manage iptables (optionals )

    + * +commands.cfg (optional) +* manage iptables (optionals )

    SERVICE * manage NRPE service

    @@ -192,7 +193,9 @@ details about class deployment on Confdroid.com.

    The following parameters are editable via params.pp or through ENC (recommended). Values changed will take immediate effect -at next puppet run. Services will be restarted where neccessary.

    +at next puppet run. Services will be restarted where neccessary. If you +want to override parameters, the module must be +specifically declared to hosts when using ENC.

    Mandatory Parameters

    @@ -274,7 +277,7 @@ environments.

    diff --git a/doc/puppet_class_list.html b/doc/puppet_class_list.html index 8abae00..5c81160 100644 --- a/doc/puppet_class_list.html +++ b/doc/puppet_class_list.html @@ -47,9 +47,9 @@ -
  • +
  • - cd_nrpe::commands::definitions + cd_nrpe::commands::definition_rules
  • diff --git a/doc/puppet_classes/cd_nrpe.html b/doc/puppet_classes/cd_nrpe.html index e64569b..a7a3556 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 new file mode 100644 index 0000000..a26e510 --- /dev/null +++ b/doc/puppet_classes/cd_nrpe_3A_3Acommands_3A_3Adefinition_rules.html @@ -0,0 +1,217 @@ + + + + + + + Puppet Class: cd_nrpe::commands::definition_rules + + — Documentation by YARD 0.9.9 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: cd_nrpe::commands::definition_rules

    +
    + +
    +
    Inherits:
    +
    cd_nrpe::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/commands/definition_rules.pp +
    +
    +
    + +

    Summary

    + manage command definitions via define and Puppet rules. + +

    Overview

    +
    +
    + +

    cd_nrpe::commands::definition_rules.pp +Module name: cd_nrpe +Author: Arne +Teuke (arne_teuke@ConfDroid.com)

    + +

    License:

    + +

    This file is part of cd_nrpe.

    + +

    cd_nrpe is used for providing automatic configuration of NRPE. + Copyright +(C) 2016 ConfDroid (copyright@ConfDroid.com) + This program is free +software: you can redistribute it and/or modify + it under the terms of the +GNU General Public License as published by + the Free Software Foundation, +either version 3 of the License, or + (at your option) any later version.

    + +

    This program is distributed in the hope that it will be useful, + but +WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License +for more details.

    + +

    You should have received a copy of the GNU General Public License + along +with this program. If not, see www.gnu.org/licenses/.

    + +
    +
    +
    + + +
    + + + + + +
    +
    +
    +
    +23
    +24
    +25
    +26
    +27
    +28
    +29
    +30
    +31
    +32
    +33
    +34
    +35
    +36
    +37
    +38
    +39
    +40
    +41
    +42
    +43
    +44
    +45
    +46
    +47
    +48
    +49
    +50
    +51
    +52
    +53
    +54
    +55
    +56
    +
    +
    # File 'manifests/commands/definition_rules.pp', line 23
    +
    +class cd_nrpe::commands::definition_rules (
    +
    +) inherits cd_nrpe::params {
    +
    +  if $ne_manage_cmds == true {
    +
    +    # manage the commands.cfg file
    +
    +    concat { $ne_cmd_file:
    +      ensure    =>  present,
    +      path      =>  $ne_cmd_file,
    +      owner     =>  'root',
    +      group     =>  'root',
    +      mode      =>  '0640',
    +      selrange  =>  s0,
    +      selrole   =>  object_r,
    +      seltype   =>  nrpe_etc_t,
    +      seluser   =>  system_u,
    +      notify    =>  Service[$ne_service],
    +    }
    +
    +    # manage the file header
    +
    +    concat::fragment { 'nrpe_cmd_header':
    +      target    =>  $ne_cmd_file,
    +      content   =>  template($ne_cmd_head_erb),
    +      order     =>  '000',
    +    }
    +
    +    # basic example rules
    +
    +
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file 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 673bf90..c5c3e0f 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 d06006e..b1eb0c0 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 89d3b54..742c5e0 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 ac70562..28e6a2b 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 1f11506..05205f0 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 8fbc8c4..9a58c18 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 0d15279..61b4987 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 6c13781..cd82ecb 100644 --- a/doc/puppet_classes/cd_nrpe_3A_3Aparams.html +++ b/doc/puppet_classes/cd_nrpe_3A_3Aparams.html @@ -81,7 +81,7 @@ cd_nrpe::firewall::iptables
    - cd_nrpe::commands::definitions
    + cd_nrpe::commands::definition_rules
    @@ -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 950e7c9..78443bd 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 @@ -203,7 +203,10 @@ checks.

    44 45 46 -47 +47 +48 +49 +50
    # File 'manifests/commands/definitions.pp', line 31
    @@ -218,11 +221,14 @@ $ne_cmd_argstring = undef,
     
     $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),
    +    concat::fragment { $name:
    +      target    =>  $ne_cmd_file,
    +      content   =>  template($ne_cmd_rule_erb),
    +    }
       }
     }
    @@ -232,7 +238,7 @@ $ne_cmd_rule_erb = $::cd_nrpe::params::ne_cmd_rule_erb diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index b43168c..b8e97c8 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@ diff --git a/manifests/commands/definition_rules.pp b/manifests/commands/definition_rules.pp index c8767f5..108462b 100644 --- a/manifests/commands/definition_rules.pp +++ b/manifests/commands/definition_rules.pp @@ -20,7 +20,7 @@ # along with this program. If not, see . # @summary manage command definitions via define and Puppet rules. ############################################################################### -class cd_nrpe::commands::definitions ( +class cd_nrpe::commands::definition_rules ( ) inherits cd_nrpe::params { diff --git a/manifests/commands/definitions.pp b/manifests/commands/definitions.pp index 0a0ba4e..0d5856c 100644 --- a/manifests/commands/definitions.pp +++ b/manifests/commands/definitions.pp @@ -38,10 +38,13 @@ $ne_cmd_argstring = undef, $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), + concat::fragment { $name: + target => $ne_cmd_file, + content => template($ne_cmd_rule_erb), + } } }