Puppet Class: nagios::nrpe

Inherits:
::nagios::params
Defined in:
manifests/nrpe.pp

Overview

Parameters:

  • package_name_nrpe (Any) (defaults to: $::nagios::params::package_name_nrpe)
  • configfile_nrpe (Any) (defaults to: '/etc/nagios/nrpe.cfg')
  • template_nrpe (Any) (defaults to: 'nagios/nrpe.erb')
  • log_facility (Any) (defaults to: undef)
  • pid_file (Any) (defaults to: undef)
  • server_port (Any) (defaults to: undef)
  • nrpe_user (Any) (defaults to: undef)
  • nrpe_group (Any) (defaults to: undef)
  • allowed_hosts (Any) (defaults to: undef)
  • dont_blame_nrpe (Any) (defaults to: undef)
  • allow_bash_command_substitution (Any) (defaults to: undef)
  • debug (Any) (defaults to: undef)
  • command_timeout (Any) (defaults to: undef)
  • connection_timeout (Any) (defaults to: undef)
  • command (Any) (defaults to: [])
  • include_dir (Any) (defaults to: [])
  • include (Any) (defaults to: [])


1
2
3
4
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
# File 'manifests/nrpe.pp', line 1

class nagios::nrpe (
  $package_name_nrpe               = $::nagios::params::package_name_nrpe,
  $configfile_nrpe                 = '/etc/nagios/nrpe.cfg',
  $template_nrpe                   = 'nagios/nrpe.erb',
  $log_facility                    = undef,
  $pid_file                        = undef,
  $server_port                     = undef,
  $nrpe_user                       = undef,
  $nrpe_group                      = undef,
  $allowed_hosts                   = undef,
  $dont_blame_nrpe                 = undef,
  $allow_bash_command_substitution = undef,
  $debug                           = undef,
  $command_timeout                 = undef,
  $connection_timeout              = undef,
  $command                         = [],
  $include_dir                     = [],
  $include                         = [],
) inherits ::nagios::params {
  package { $package_name_nrpe: ensure => installed }
  file { $configfile_nrpe:
    require => package[$package_name_nrpe],
    backup  => '.backup',
    content => template($template_nrpe),
  }
  if $::osfamily == 'RedHat' {
    service { 'nrpe':
      require => package[$package_name_nrpe],
      enable  => true,
    }
  }
}