diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index cfabd8b..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "cSpell.words": [ - "argstring", - "checkmodule", - "dont", - "getsebool", - "metachars", - "procs", - "refreshonly", - "semodule", - "setsebool", - "sysconfig" - ] -} \ No newline at end of file diff --git a/doc/_index.html b/doc/_index.html index a8a6262..f40d9ec 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -69,57 +69,57 @@ -

In order to apply parameters through Foreman, cd_nrpe::params must be added to the host or host group in question, unless the defaults are fully acceptable across the estate.

+

In order to apply parameters through Foreman, confdroid_nrpe::params must be added to the host or host group in question, unless the defaults are fully acceptable across the estate.

See more details about class deployment on Confdroid.com.

@@ -153,7 +153,7 @@

Defining commands is as simple as that:

-
cd_nrpe::commands::definitions { 'check_users':
+
confdroid_nrpe::commands::definitions { 'check_users':
       ne_check_cmd      =>  'check_users',
       ne_cmd_argstring  =>  '-w $ARG1$ -c $ARG2$',
     }
diff --git a/doc/puppet_class_list.html b/doc/puppet_class_list.html
index 11976a7..7401c21 100644
--- a/doc/puppet_class_list.html
+++ b/doc/puppet_class_list.html
@@ -40,79 +40,79 @@
       
    -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • diff --git a/doc/puppet_classes/confdroid_nrpe.html b/doc/puppet_classes/confdroid_nrpe.html new file mode 100644 index 0000000..70fd5c9 --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe.html @@ -0,0 +1,121 @@ + + + + + + + Puppet Class: confdroid_nrpe + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe

    +
    + + +
    +
    Defined in:
    +
    + manifests/init.pp +
    +
    +
    + +

    Summary

    + Class initializes the confdroid_nrpe Module. + +

    Overview

    +
    +
    + +

    confdroid_nrpe::init.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@confdroid.com)

    + +
    +
    + + + +
    + + + +
    + + + + + +
    +
    +
    +
    +6
    +7
    +8
    +
    +
    # File 'manifests/init.pp', line 6
    +
    +class confdroid_nrpe {
    +  include confdroid_nrpe::params
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Acommands_3A_3Adefinition_rules.html b/doc/puppet_classes/confdroid_nrpe_3A_3Acommands_3A_3Adefinition_rules.html new file mode 100644 index 0000000..1165848 --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Acommands_3A_3Adefinition_rules.html @@ -0,0 +1,248 @@ + + + + + + + Puppet Class: confdroid_nrpe::commands::definition_rules + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::commands::definition_rules

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

    Summary

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

    Overview

    +
    +
    + +

    confdroid_nrpe::commands::definition_rules.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com)

    + +
    +
    + + + +
    + +
    +

    Examples:

    + + +
    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',
    +}
    + +
    + + + +
    + + + + + +
    +
    +
    +
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    +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
    +57
    +58
    +59
    +60
    +61
    +62
    +63
    +64
    +65
    +66
    +67
    +68
    +69
    +
    +
    # File 'manifests/commands/definition_rules.pp', line 12
    +
    +class confdroid_nrpe::commands::definition_rules (
    +
    +) inherits confdroid_nrpe::params {
    +  if $ne_manage_cmds == true {
    +    require confdroid_nrpe::main::files
    +
    +    # manage the commands.cfg file
    +
    +    concat { $ne_cmd_file:
    +      ensure   => present,
    +      path     => $ne_cmd_file,
    +      owner    => $ne_user,
    +      group    => $ne_user,
    +      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
    +
    +    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',
    +    }
    +
    +    confdroid_nrpe::commands::definitions { 'check_load':
    +      ne_check_cmd     => 'check_load',
    +      ne_cmd_argstring => '-w $ARG1$ -c $ARG2$',
    +    }
    +
    +    confdroid_nrpe::commands::definitions { 'check_disk':
    +      ne_check_cmd     => 'check_disk',
    +      ne_cmd_argstring => '-w $ARG1$ -c $ARG2$ -p $ARG3$',
    +    }
    +
    +    confdroid_nrpe::commands::definitions { 'check_procs':
    +      ne_check_cmd     => 'check_procs',
    +      ne_cmd_argstring => '-w $ARG1$ -c $ARG2$ -s $ARG3$',
    +    }
    +
    +    confdroid_nrpe::commands::definitions { 'check_swap':
    +      ne_check_cmd     => 'check_swap',
    +      ne_cmd_argstring => '-w $ARG1$ -c $ARG2$',
    +    }
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Afirewall_3A_3Aiptables.html b/doc/puppet_classes/confdroid_nrpe_3A_3Afirewall_3A_3Aiptables.html new file mode 100644 index 0000000..bcacf11 --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Afirewall_3A_3Aiptables.html @@ -0,0 +1,142 @@ + + + + + + + Puppet Class: confdroid_nrpe::firewall::iptables + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::firewall::iptables

    +
    + +
    +
    Inherits:
    +
    confdroid_nrpe::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/firewall/iptables.pp +
    +
    +
    + +

    Summary

    + manage firewall settings through puppetlabs-firewall + +

    Overview

    +
    +
    + +
    +
    + + + +
    + + + +
    + + + + + +
    +
    +
    +
    +7
    +8
    +9
    +10
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +
    +
    # File 'manifests/firewall/iptables.pp', line 7
    +
    +class confdroid_nrpe::firewall::iptables (
    +
    +) inherits confdroid_nrpe::params {
    +  if $ne_incl_fw == true {
    +    firewall { "${ne_fw_order_no}${ne_nrpe_port} port ${ne_nrpe_port}":
    +#      source => $nagios_server,
    +      proto => 'tcp',
    +      dport => $ne_nrpe_port,
    +      jump  => 'accept',
    +    }
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Aconfig.html new file mode 100644 index 0000000..cb31dfc --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Aconfig.html @@ -0,0 +1,128 @@ + + + + + + + Puppet Class: confdroid_nrpe::main::config + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::main::config

    +
    + +
    +
    Inherits:
    +
    confdroid_nrpe::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/main/config.pp +
    +
    +
    + +

    Summary

    + Class manages the module logic for confdroid_nrpe. + +

    Overview

    +
    +
    + +
    +
    + + + +
    + + + +
    + + + + + +
    +
    +
    +
    +7
    +8
    +9
    +10
    +11
    +
    +
    # File 'manifests/main/config.pp', line 7
    +
    +class confdroid_nrpe::main::config (
    +
    +) inherits confdroid_nrpe::params {
    +  include confdroid_nrpe::main::service
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Adirs.html new file mode 100644 index 0000000..2d29ec8 --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Adirs.html @@ -0,0 +1,182 @@ + + + + + + + Puppet Class: confdroid_nrpe::main::dirs + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::main::dirs

    +
    + +
    +
    Inherits:
    +
    confdroid_nrpe::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/main/dirs.pp +
    +
    +
    + +

    Summary

    + Class manages all directories required for confdroid_nrpe. + +

    Overview

    +
    +
    + +

    confdroid_nrpe::main::dirs.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com)

    + +
    +
    + + + +
    + + + +
    + + + + + +
    +
    +
    +
    +6
    +7
    +8
    +9
    +10
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    +23
    +24
    +25
    +26
    +27
    +28
    +29
    +30
    +31
    +32
    +33
    +34
    +35
    +36
    +
    +
    # File 'manifests/main/dirs.pp', line 6
    +
    +class confdroid_nrpe::main::dirs (
    +
    +) inherits confdroid_nrpe::params {
    +  require confdroid_nrpe::main::user
    +
    +  # manage main conf_d_dir
    +
    +  file { $ne_main_conf_d_dir:
    +    ensure   => directory,
    +    path     => $ne_main_conf_d_dir,
    +    owner    => 'root',
    +    group    => 'root',
    +    mode     => '0755',
    +    selrange => s0,
    +    selrole  => object_r,
    +    seltype  => etc_t,
    +    seluser  => system_u,
    +  }
    +
    +  file { $ne_run_dir:
    +    ensure   => directory,
    +    path     => $ne_run_dir,
    +    owner    => $ne_user,
    +    group    => $ne_user,
    +    mode     => '0755',
    +    selrange => s0,
    +    selrole  => object_r,
    +    seltype  => var_run_t,
    +    seluser  => system_u,
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Afiles.html new file mode 100644 index 0000000..c211ec4 --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Afiles.html @@ -0,0 +1,256 @@ + + + + + + + Puppet Class: confdroid_nrpe::main::files + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::main::files

    +
    + +
    +
    Inherits:
    +
    confdroid_nrpe::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/main/files.pp +
    +
    +
    + +

    Summary

    + Class manages all configuration files required for confdroid_nrpe. + +

    Overview

    +
    +
    + +

    confdroid_nrpe::main::files.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com)

    + +
    +
    + + + +
    + + + +
    + + + + + +
    +
    +
    +
    +6
    +7
    +8
    +9
    +10
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    +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
    +57
    +58
    +59
    +60
    +61
    +62
    +63
    +64
    +65
    +66
    +67
    +68
    +69
    +70
    +71
    +72
    +73
    +
    +
    # File 'manifests/main/files.pp', line 6
    +
    +class confdroid_nrpe::main::files (
    +
    +) inherits confdroid_nrpe::params {
    +  require confdroid_nrpe::main::dirs
    +
    +  # manage /etc/nagios/nrpe.cfg
    +
    +  file { $ne_main_conf_file:
    +    ensure   => file,
    +    path     => $ne_main_conf_file,
    +    owner    => 'root',
    +    group    => 'root',
    +    mode     => '0644',
    +    selrange => s0,
    +    selrole  => object_r,
    +    seltype  => nrpe_etc_t,
    +    seluser  => system_u,
    +    content  => template($ne_main_conf_erb),
    +    notify   => Service[$ne_service],
    +  }
    +
    +  # manage /etc/sysconfig/nrpe
    +
    +  file { $ne_nrpe_conf_file:
    +    ensure   => file,
    +    path     => $ne_nrpe_conf_file,
    +    owner    => 'root',
    +    group    => 'root',
    +    mode     => '0644',
    +    selrange => s0,
    +    selrole  => object_r,
    +    seltype  => etc_t,
    +    seluser  => system_u,
    +    content  => template($ne_nrpe_conf_erb),
    +    notify   => Service[$ne_service],
    +  }
    +
    +  if $ne_allow_sudo == true {
    +
    +    file { $ne_sudo_file:
    +      ensure   => file,
    +      path     => $ne_sudo_file,
    +      owner    => 'root',
    +      group    => 'root',
    +      mode     => '0440',
    +      selrange => s0,
    +      selrole  => object_r,
    +      seltype  => etc_t,
    +      seluser  => system_u,
    +      content  => template($ne_sudo_rule_erb),
    +    }
    +
    +    # file for sudo  selinux policy
    +    file { $ne_nrpe_te_file:
    +      ensure   => file,
    +      path     => $ne_nrpe_te_file,
    +      owner    => 'root',
    +      group    => 'root',
    +      mode     => '0440',
    +      selrange => s0,
    +      selrole  => object_r,
    +      seltype  => nrpe_etc_t,
    +      seluser  => system_u,
    +      content  => template($ne_nrpe_te_erb),
    +      notify   => Exec['create_nrpe_pp'],
    +    }
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Ainstall.html new file mode 100644 index 0000000..99c0ab7 --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Ainstall.html @@ -0,0 +1,138 @@ + + + + + + + Puppet Class: confdroid_nrpe::main::install + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::main::install

    +
    + +
    +
    Inherits:
    +
    confdroid_nrpe::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/main/install.pp +
    +
    +
    + +

    Summary

    + Class manages installing binaries required for confdroid_nrpe + +

    Overview

    +
    +
    + +

    confdroid_nrpe::main::install.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com)

    + +
    +
    + + + +
    + + + +
    + + + + + +
    +
    +
    +
    +6
    +7
    +8
    +9
    +10
    +11
    +12
    +13
    +14
    +
    +
    # File 'manifests/main/install.pp', line 6
    +
    +class confdroid_nrpe::main::install (
    +
    +) inherits confdroid_nrpe::params {
    +  require confdroid_resources::main::epel
    +
    +  package { $reqpackages:
    +    ensure => $pkg_ensure,
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Aservice.html b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Aservice.html new file mode 100644 index 0000000..e0fe38a --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Aservice.html @@ -0,0 +1,168 @@ + + + + + + + Puppet Class: confdroid_nrpe::main::service + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::main::service

    +
    + +
    +
    Inherits:
    +
    confdroid_nrpe::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/main/service.pp +
    +
    +
    + +

    Summary

    + Class manages the service(s) for confdroid_nrpe. + +

    Overview

    +
    +
    + +

    confdroid_nrpe::main::service.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com)

    + +
    +
    + + + +
    + + + +
    + + + + + +
    +
    +
    +
    +6
    +7
    +8
    +9
    +10
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    +23
    +24
    +25
    +26
    +27
    +28
    +29
    +
    +
    # File 'manifests/main/service.pp', line 6
    +
    +class confdroid_nrpe::main::service (
    +
    +) inherits confdroid_nrpe::params {
    +  require confdroid_nrpe::main::files
    +
    +  if $ne_incl_fw == true {
    +    require confdroid_nrpe::firewall::iptables
    +  }
    +
    +  if $ne_manage_cmds == true {
    +    require confdroid_nrpe::commands::definition_rules
    +  }
    +
    +  if $ne_include_selinux == true {
    +    require confdroid_nrpe::selinux::config
    +  }
    +
    +  service { $ne_service:
    +    ensure     => running,
    +    hasstatus  => true,
    +    hasrestart => true,
    +    enable     => true,
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Auser.html b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Auser.html new file mode 100644 index 0000000..d2093b6 --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Amain_3A_3Auser.html @@ -0,0 +1,172 @@ + + + + + + + Puppet Class: confdroid_nrpe::main::user + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::main::user

    +
    + +
    +
    Inherits:
    +
    confdroid_nrpe::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/main/user.pp +
    +
    +
    + +

    Summary

    + Class manages service users for confdroid_nrpe. + +

    Overview

    +
    +
    + +

    confdroid_nrpe::main::user.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com)

    + +
    +
    + + + +
    + + + +
    + + + + + +
    +
    +
    +
    +6
    +7
    +8
    +9
    +10
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    +23
    +24
    +25
    +26
    +27
    +28
    +29
    +30
    +31
    +
    +
    # File 'manifests/main/user.pp', line 6
    +
    +class confdroid_nrpe::main::user (
    +
    +) inherits confdroid_nrpe::params {
    +  require confdroid_nrpe::main::install
    +
    +  group { $ne_user:
    +    ensure    => present,
    +    name      => $ne_user,
    +    gid       => $ne_user_uid,
    +    allowdupe => false,
    +  }
    +
    +  user { $ne_user:
    +    ensure     => present,
    +    name       => $ne_user,
    +    allowdupe  => false,
    +    comment    => $ne_user_comment,
    +    uid        => $ne_user_uid,
    +    gid        => $ne_user,
    +    groups     => $ne_user_groups,
    +    managehome => true,
    +    home       => $ne_user_home,
    +    shell      => $ne_user_shell,
    +    require    => Group[$ne_user],
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Aparams.html b/doc/puppet_classes/confdroid_nrpe_3A_3Aparams.html new file mode 100644 index 0000000..4b82d70 --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Aparams.html @@ -0,0 +1,974 @@ + + + + + + + Puppet Class: confdroid_nrpe::params + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::params

    + + +

    Summary

    + Class holds all parameters for the confdroid_nrpe module and is +inherited by all classes except defines. + +

    Overview

    +
    +
    + +

    confdroid_nrpe::params.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com) be passed to the NRPE daemon.

    + +
    +
    + + + +
    +

    Parameters:

    +
      + +
    • + + pkg_ensure + + + (String) + + + (defaults to: 'present') + + + — +
      +

      which package type to choose, i.e. latest or present.

      +
      + +
    • + +
    • + + ne_log_facility + + + (String) + + + (defaults to: 'daemon') + + + — +
      +

      the log facility to use.

      +
      + +
    • + +
    • + + ne_log_file + + + (String) + + + (defaults to: '') + + + — +
      +

      If a log file is specified in this option, nrpe will write to that file instead of using syslog. i.e. /var/run/nrpe.log

      +
      + +
    • + +
    • + + ne_debug + + + (String) + + + (defaults to: '0') + + + — +
      +

      Whether debugging messages are logged to the syslog facility.

      +
      + +
    • + +
    • + + ne_nrpe_port + + + (String) + + + (defaults to: '5666') + + + — +
      +

      the NRPE port. used in firewall ( optional) and configuration file.

      +
      + +
    • + +
    • + + ne_listen_queue_size + + + (String) + + + (defaults to: '5') + + + — +
      +

      Listen queue size (backlog) for serving incoming connections.

      +
      + +
    • + +
    • + + ne_nagios_server + + + (String) + + + (defaults to: 'nagios.example.net') + + + — +
      +

      ipaddress of the nagios server to be allowed to connect to NRPE service. Default is to look up a global parameter from ENC.

      +
      + +
    • + +
    • + + ne_dont_blame_nrpe + + + (String) + + + (defaults to: '1') + + + — +
      +

      whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.

      +
      + +
    • + +
    • + + ne_allow_bash_cmd_subst + + + (String) + + + (defaults to: '1') + + + — +
      +

      whether or not the NRPE daemon will allow clients to specify arguments that contain bash command substitutions of the form $(…).

      +
      + +
    • + +
    • + + ne_allow_sudo + + + (Boolean) + + + (defaults to: true) + + + — +
      +

      Whether to allow sudo access. used in nrpe.cfg as well as for creating a sudo role.

      +
      + +
    • + +
    • + + ne_command_prefix + + + (String) + + + (defaults to: '/usr/bin/sudo') + + + — +
      +

      allows you to prefix all commands with a user-defined String.

      +
      + +
    • + +
    • + + ne_incl_fw + + + (Boolean) + + + (defaults to: true) + + + — +
      +

      Whether to include firewall rules

      +
      + +
    • + +
    • + + ne_command_timeout + + + (String) + + + (defaults to: '60') + + + — +
      +

      maximum number of seconds that the NRPE daemon will allow plugins to finish executing before killing them off.

      +
      + +
    • + +
    • + + ne_connection_timeout + + + (String) + + + (defaults to: '300') + + + — +
      +

      maximum number of seconds that the NRPE daemon will wait for a connection to be established before exiting.

      +
      + +
    • + +
    • + + ne_ssl_version + + + (String) + + + (defaults to: 'TLSv2+') + + + — +
      +

      These directives allow you to specify how to use SSL/TLS.

      +
      + +
    • + +
    • + + ne_ssl_use_adh + + + (String) + + + (defaults to: '1') + + + — +
      +

      This is for backward compatibility and is DEPRECATED. Set to 1 to enable ADH or 2 to require ADH. 1 is currently the default but will be changed in a later version.

      +
      + +
    • + +
    • + + ne_ssl_cipher_list + + + (String) + + + (defaults to: 'ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!RC4:!MD5:@STRENGTH') + + + — +
      +

      ciphers can be used. For backward compatibility, this defaults to ‘ssl_cipher_list=ALL:!MD5:@STRENGTH’ in this version but will be changed in a later version of NRPE.

      +
      + +
    • + +
    • + + ne_ssl_cacert_file + + + (String) + + + (defaults to: '/etc/pki/tls/certs/ca-chain.crt.pem') + + + — +
      +

      path and name of the ssl certificate authority (ca) file / chain. must be full path.

      +
      + +
    • + +
    • + + ne_ssl_client_certs + + + (String) + + + (defaults to: '2') + + + — +
      +

      determines client certificate usage. Values: 0 = Don’t ask for or require client certificates 1 = Ask for client certificates 2 = Require client certificates

      +
      + +
    • + +
    • + + ne_ssl_logging + + + (String) + + + (defaults to: '0x00') + + + — +
      +

      determines which SSL messages are send to syslog. OR values together to specify multiple options. Values: 0x00 (0) = No additional logging (default) 0x01 (1) = Log startup SSL/TLS parameters 0x02 (2) = Log remote IP address 0x04 (4) = Log SSL/TLS version of connections 0x08 (8) = Log which cipher is being used for the connection 0x10 (16) = Log if client has a certificate 0x20 (32) = Log details of client’s certificate if it has one -1 or 0xff or 0x2f = All of the above

      +
      + +
    • + +
    • + + ne_nasty_metachars + + + (Array) + + + (defaults to: ["|`&><'\\[]{};\r\n"]) + + + — +
      +

      list of characters that cannot

      +
      + +
    • + +
    • + + ne_include_file + + + (String) + + + (defaults to: '') + + + — +
      +

      include definitions from an external config file.

      +
      + +
    • + +
    • + + ne_fw_order_no + + + (String) + + + (defaults to: '50') + + + — +
      +

      ordering prefix for he firewall rules. Adjust to your environment if needed.

      +
      + +
    • + +
    • + + ne_ssl_opts + + + (String) + + + (defaults to: '') + + + — +
      +

      Specify additional SSL options.

      +
      + +
    • + +
    • + + ne_user + + + (String) + + + (defaults to: 'nrpe') + + + — +
      +

      the NRPE service user

      +
      + +
    • + +
    • + + ne_user_comment + + + (String) + + + (defaults to: 'NRPE service user') + + + — +
      +

      The comment for the service user /etc/passwd

      +
      + +
    • + +
    • + + ne_user_uid + + + (String) + + + (defaults to: '1005') + + + — +
      +

      the UID for the service user

      +
      + +
    • + +
    • + + ne_user_home + + + (String) + + + (defaults to: '/var/run/nrpe') + + + — +
      +

      the home for the service user

      +
      + +
    • + +
    • + + ne_user_shell + + + (String) + + + (defaults to: '/sbin/nologin') + + + — +
      +

      the shell for the service user.

      +
      + +
    • + +
    • + + ne_user_groups + + + (Optional[String]) + + + (defaults to: undef) + + + — +
      +

      additional groups for the service user.

      +
      + +
    • + +
    • + + ne_server_address + + + (String) + + + (defaults to: '0.0.0.0') + + + — +
      +

      the network interfaces to listen on

      +
      + +
    • + +
    • + + ne_allow_weak_rnd_seed + + + (String) + + + (defaults to: '1') + + + — +
      +

      Whether to allow weak random seeds

      +
      + +
    • + +
    • + + ne_include_selinux + + + (Boolean) + + + (defaults to: true) + + + — +
      +

      Whether to manage selinux

      +
      + +
    • + +
    • + + ne_enable_ssl + + + (Boolean) + + + (defaults to: false) + + + — +
      +

      Whether to enable SSL certificates.

      +
      + +
    • + +
    • + + reqpackages + + + (Array) + + + (defaults to: ['nrpe','nrpe-selinux']) + + + — +
      +

      which packages to install

      +
      + +
    • + +
    • + + ne_manage_cmds + + + (Boolean) + + + (defaults to: true) + + + — +
      +

      Whether to manage command rules for NRPE checks, to allow dynamic check & command rules.

      +
      + +
    • + +
    + + + +

    See Also:

    + + +
    + + + + + +
    +
    +
    +
    +81
    +82
    +83
    +84
    +85
    +86
    +87
    +88
    +89
    +90
    +91
    +92
    +93
    +94
    +95
    +96
    +97
    +98
    +99
    +100
    +101
    +102
    +103
    +104
    +105
    +106
    +107
    +108
    +109
    +110
    +111
    +112
    +113
    +114
    +115
    +116
    +117
    +118
    +119
    +120
    +121
    +122
    +123
    +124
    +125
    +126
    +127
    +128
    +129
    +130
    +131
    +132
    +133
    +134
    +135
    +136
    +137
    +138
    +139
    +140
    +141
    +142
    +143
    +144
    +145
    +146
    +147
    +148
    +149
    +150
    +151
    +152
    +153
    +154
    +155
    +156
    +157
    +158
    +159
    +160
    +161
    +162
    +163
    +164
    +165
    +166
    +167
    +
    +
    # File 'manifests/params.pp', line 81
    +
    +class confdroid_nrpe::params (
    +
    +  String $pkg_ensure                 = 'present',
    +  Array $reqpackages                = ['nrpe','nrpe-selinux'],
    +
    +  Boolean $ne_manage_cmds             = true,
    +
    +# NRPE user settings
    +  String $ne_user                    = 'nrpe',
    +  String $ne_user_comment            = 'NRPE service user',
    +  String $ne_user_uid                = '1005',
    +  String $ne_user_home               = '/var/run/nrpe',
    +  Optional[String] $ne_user_groups   = undef,
    +  String $ne_user_shell              = '/sbin/nologin',
    +
    +# nrpe.cfg
    +  String $ne_log_facility            = 'daemon',
    +  String $ne_log_file                = '',
    +  String $ne_debug                   = '0',
    +  String $ne_nrpe_port               = '5666',
    +  String $ne_server_address          = '0.0.0.0',
    +  String $ne_listen_queue_size       = '5',
    +  String $ne_nagios_server           = 'nagios.example.net',
    +  String $ne_dont_blame_nrpe         = '1',
    +  String $ne_allow_bash_cmd_subst    = '1',
    +  Boolean $ne_allow_sudo             = true,
    +  String $ne_command_prefix          = '/usr/bin/sudo',
    +  String $ne_command_timeout         = '60',
    +  String $ne_connection_timeout      = '300',
    +  String $ne_allow_weak_rnd_seed     = '1',
    +  Boolean $ne_enable_ssl             = false,
    +  String $ne_ssl_version             = 'TLSv2+',
    +  String $ne_ssl_use_adh             = '1',
    +  String $ne_ssl_cipher_list         = 'ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!RC4:!MD5:@STRENGTH',
    +  String $ne_ssl_cacert_file         = '/etc/pki/tls/certs/ca-chain.crt.pem',
    +  String $ne_ssl_client_certs        = '2',
    +  String $ne_ssl_logging             = '0x00',
    +  Array $ne_nasty_metachars          = ["|`&><'\\[]{};\r\n"],
    +  String $ne_include_file            = '',
    +
    +# nrpe.conf
    +  String $ne_ssl_opts                = '',
    +
    +# firewall
    +  Boolean $ne_incl_fw                = true,
    +  String $ne_fw_order_no             = '50',
    +
    +# selinux
    +  Boolean $ne_include_selinux        = true,
    +
    +) {
    +# Default facts
    +  $fqdn                     = $facts['networking']['fqdn']
    +  $domain                   = $facts['networking']['domain']
    +  $os_name                  = $facts['os']['name']
    +  $os_release               = $facts['os']['release']['major']
    +
    +# service
    +  $ne_service                 = 'nrpe'
    +
    +# directories
    +  $ne_main_conf_d_dir         = '/etc/nrpe.d'
    +  $ne_run_dir                 = '/var/run/nrpe'
    +
    +# files
    +  $ne_main_conf_file          = '/etc/nagios/nrpe.cfg'
    +  $ne_main_conf_erb           = 'confdroid_nrpe/nrpe_cfg.erb'
    +  $ne_nrpe_pid_file           = "${ne_run_dir}/nrpe.pid"
    +  $ne_nrpe_conf_file          = '/etc/sysconfig/nrpe'
    +  $ne_nrpe_conf_erb           = 'confdroid_nrpe/nrpe_conf.erb'
    +  $ne_cmd_file                = "${ne_main_conf_d_dir}/commands.cfg"
    +  $ne_cmd_head_erb            = 'confdroid_nrpe/cmd_head.erb'
    +  $ne_cmd_rule_erb            = 'confdroid_nrpe/cmd_rule.erb'
    +  $ne_sudo_file               = '/etc/sudoers.d/nagios_sudo'
    +  $ne_sudo_rule_erb           = 'confdroid_nrpe/sudo_rule.erb'
    +  $ne_nrpe_te_file            = "${ne_main_conf_d_dir}/nrpe.te"
    +  $ne_nrpe_te_erb             = 'confdroid_nrpe/nrpe.te.erb'
    +  $ne_nrpe_mod_file           = "${ne_main_conf_d_dir}/nrpe.mod"
    +  $ne_checkmodule_nrpe_erb    = 'confdroid_nrpe/checkmodule_nrpe.erb'
    +  $ne_nrpe_pp_file            = "${ne_main_conf_d_dir}/nrpe.pp"
    +  $ne_semodule_erb            =  'confdroid_nrpe/semodule_nrpe.erb'
    +  $ne_ssl_cert_file           = "/etc/pki/tls/certs/${fqdn}.crt.pem"
    +  $ne_ssl_privatekey_file     = "/etc/pki/tls/private/${fqdn}.key.pem"
    +
    +# includes must be last
    +  include confdroid_nrpe::main::config
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_classes/confdroid_nrpe_3A_3Aselinux_3A_3Aconfig.html b/doc/puppet_classes/confdroid_nrpe_3A_3Aselinux_3A_3Aconfig.html new file mode 100644 index 0000000..095da2b --- /dev/null +++ b/doc/puppet_classes/confdroid_nrpe_3A_3Aselinux_3A_3Aconfig.html @@ -0,0 +1,182 @@ + + + + + + + Puppet Class: confdroid_nrpe::selinux::config + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
    + + +

    Puppet Class: confdroid_nrpe::selinux::config

    +
    + +
    +
    Inherits:
    +
    confdroid_nrpe::params
    +
    + + +
    +
    Defined in:
    +
    + manifests/selinux/config.pp +
    +
    +
    + +

    Summary

    + Class manages all aspects of configuring selinux for NRPE. + +

    Overview

    +
    +
    + +

    confdroid_nrpe::selinux::config.pp # Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com)

    + +
    +
    + + + +
    + + + +
    + + + + + +
    +
    +
    +
    +5
    +6
    +7
    +8
    +9
    +10
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    +23
    +24
    +25
    +26
    +27
    +28
    +29
    +30
    +31
    +32
    +33
    +34
    +35
    +
    +
    # File 'manifests/selinux/config.pp', line 5
    +
    +class confdroid_nrpe::selinux::config (
    +
    +) inherits confdroid_nrpe::params {
    +  if $ne_include_selinux == true {
    +    #  manage allow nagios sudo
    +
    +    exec { 'nagios_run_sudo':
    +      command => 'setsebool -P nagios_run_sudo 1',
    +      path    => ['/usr/bin','/usr/sbin'],
    +      cwd     => '/tmp',
    +      unless  => 'getsebool nagios_run_sudo | awk \'{print$3}\' | grep -ic "on"'
    +    }
    +
    +    # create policy file for sudo selinux policy
    +    exec { 'create_nrpe_pp':
    +      command     => template($ne_checkmodule_nrpe_erb),
    +      user        => 'root',
    +      creates     => $ne_nrpe_pp_file,
    +      refreshonly => true,
    +      notify      => Exec['import_semodule_nrpe'],
    +    }
    +
    +    # import semodule
    +    exec { 'import_semodule_nrpe':
    +      command     => template($ne_semodule_erb),
    +      user        => 'root',
    +      unless      => '/sbin/semodule -l | grep nrpe | grep -v nrpe_',
    +      refreshonly => true,
    +    }
    +  }
    +}
    +
    +
    +
    + + + +
    + + \ No newline at end of file diff --git a/doc/puppet_defined_type_list.html b/doc/puppet_defined_type_list.html index 7ec4f3a..669a169 100644 --- a/doc/puppet_defined_type_list.html +++ b/doc/puppet_defined_type_list.html @@ -40,9 +40,9 @@
      -
    • +
    • diff --git a/doc/puppet_defined_types/confdroid_nrpe_3A_3Acommands_3A_3Adefinitions.html b/doc/puppet_defined_types/confdroid_nrpe_3A_3Acommands_3A_3Adefinitions.html new file mode 100644 index 0000000..91fbd6c --- /dev/null +++ b/doc/puppet_defined_types/confdroid_nrpe_3A_3Acommands_3A_3Adefinitions.html @@ -0,0 +1,228 @@ + + + + + + + Defined Type: confdroid_nrpe::commands::definitions + + — Documentation by YARD 0.9.36 + + + + + + + + + + + + + + + + + + + +
      + + +

      Defined Type: confdroid_nrpe::commands::definitions

      +
      +
      +
      Defined in:
      +
      + manifests/commands/definitions.pp +
      +
      +
      + +

      Summary

      + Populate command definitions through external puppet rules, i.e. +from other modules. + +

      Overview

      +
      +
      + +

      confdroid_nrpe::commands::definitions.pp Module name: confdroid_nrpe Author: 12ww1160 (12ww1160@ConfDroid.com)

      + +
      +
      + + + +
      +

      Parameters:

      +
        + +
      • + + ne_check_cmd + + + (Optional[String]) + + + (defaults to: undef) + + + — +
        +

        Specify the check_command to use.

        +
        + +
      • + +
      • + + ne_cmd_path + + + (String) + + + (defaults to: '/usr/lib64/nagios/plugins/') + + + — +
        +

        The path to the command scripts, usually where the nagios_plugins are located. If you use your own scripts, specify the custom location including the trailing slash

        +
        + +
      • + +
      • + + ne_cmd_argstring + + + (Optional[String]) + + + (defaults to: undef) + + + — +
        +

        Specify the string of valid argument for the command , i.e. -w $ARG1$ -c $ARG2$. See the arguments in the man pages for the checks.

        +
        + +
      • + +
      • + + ne_cmd_comment + + + (String) + + + (defaults to: '') + + + — +
        +

        Specify an optional comment for your command definition

        +
        + +
      • + +
      + + + +
      + + + + + +
      +
      +
      +
      +16
      +17
      +18
      +19
      +20
      +21
      +22
      +23
      +24
      +25
      +26
      +27
      +28
      +29
      +30
      +31
      +32
      +33
      +34
      +
      +
      # File 'manifests/commands/definitions.pp', line 16
      +
      +define confdroid_nrpe::commands::definitions (
      +
      +  Optional[String] $ne_check_cmd      = undef,
      +  String $ne_cmd_path                 = '/usr/lib64/nagios/plugins/',
      +  Optional[String] $ne_cmd_argstring  = undef,
      +  String $ne_cmd_comment              = '',
      +
      +) {
      +  $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:
      +      target  => $ne_cmd_file,
      +      content => template($ne_cmd_rule_erb),
      +    }
      +  }
      +}
      +
      +
      +
      + + + +
      + + \ No newline at end of file