Merge branch 'refactor/rename_client_to_nrpe' into develop
This commit is contained in:
commit
c869877158
8 changed files with 40 additions and 40 deletions
|
@ -82,7 +82,7 @@ class { 'icinga2::server':
|
|||
}
|
||||
</pre>
|
||||
|
||||
**Note:** If you will be installing NRPE or the Nagios plugins packages with the `icinga2::client` class on a node that also has the `icinga2::server` class applied, be sure to set the `$server_install_nagios_plugins` parameter in your call to `icinga2::server` to `false`:
|
||||
**Note:** If you will be installing NRPE or the Nagios plugins packages with the `icinga2::nrpe` class on a node that also has the `icinga2::server` class applied, be sure to set the `$server_install_nagios_plugins` parameter in your call to `icinga2::server` to `false`:
|
||||
|
||||
<pre>
|
||||
#Install Icinga 2:
|
||||
|
@ -93,7 +93,7 @@ class { 'icinga2::server':
|
|||
}
|
||||
</pre>
|
||||
|
||||
This will stop the `icinga2::server` class from trying to install the plugins pacakges, since the `icinga2::client` class will already be installing them and will prevent a resulting duplicate resource error.
|
||||
This will stop the `icinga2::server` class from trying to install the plugins pacakges, since the `icinga2::nrpe` class will already be installing them and will prevent a resulting duplicate resource error.
|
||||
|
||||
|
||||
####Client usage
|
||||
|
@ -116,4 +116,4 @@ class { 'icinga2::server':
|
|||
}
|
||||
</pre>
|
||||
|
||||
This will stop the `icinga2::server` class from trying to install the plugins pacakges, since the `icinga2::client` class will already be installing them and will prevent a resulting duplicate resource error.
|
||||
This will stop the `icinga2::server` class from trying to install the plugins pacakges, since the `icinga2::nrpe` class will already be installing them and will prevent a resulting duplicate resource error.
|
|
@ -1,10 +1,10 @@
|
|||
# Class: icinga2::client
|
||||
# Class: icinga2::nrpe
|
||||
#
|
||||
# This subclass manages Icinga client components. This class is just the entry point for Puppet to get at the
|
||||
# icinga2::client:: subclasses.
|
||||
# icinga2::nrpe:: subclasses.
|
||||
#
|
||||
|
||||
class icinga2::client (
|
||||
class icinga2::nrpe (
|
||||
|
||||
$nrpe_listen_port = $icinga2::params::nrpe_listen_port,
|
||||
$nrpe_debug_level = $icinga2::params::nrpe_debug_level,
|
||||
|
@ -18,7 +18,7 @@ class icinga2::client (
|
|||
#Apply our classes in the right order. Use the squiggly arrows (~>) to ensure that the
|
||||
#class left is applied before the class on the right and that it also refreshes the
|
||||
#class on the right.
|
||||
class {'icinga2::client::install':} ~>
|
||||
class {'icinga2::client::config':} ~>
|
||||
class {'icinga2::client::service':}
|
||||
class {'icinga2::nrpe::install':} ~>
|
||||
class {'icinga2::nrpe::config':} ~>
|
||||
class {'icinga2::nrpe::service':}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
# Define icinga2::client::command
|
||||
# Define icinga2::nrpe::command
|
||||
#
|
||||
# This defined type creates NRPE command definitions on machines running NRPE.
|
||||
#
|
||||
|
@ -9,7 +9,7 @@
|
|||
# * $nrpe_plugin_args = The arguments to pass to the plugin. This may be optional,
|
||||
# depending on the plugin and whether it expects any arguments or parameters
|
||||
|
||||
define icinga2::client::command (
|
||||
define icinga2::nrpe::command (
|
||||
$command_name = $name,
|
||||
$nrpe_plugin_liddir = $icinga2::params::nrpe_plugin_liddir,
|
||||
$nrpe_plugin_name = undef,
|
|
@ -1,11 +1,11 @@
|
|||
# Class: icinga2::client::config
|
||||
# Class: icinga2::nrpe::config
|
||||
#
|
||||
# This subclass configures Icinga clients.
|
||||
#
|
||||
|
||||
class icinga2::client::config inherits icinga2::client {
|
||||
class icinga2::nrpe::config inherits icinga2::nrpe {
|
||||
|
||||
include icinga2::client
|
||||
include icinga2::nrpe
|
||||
|
||||
#config resources here
|
||||
|
|
@ -1,25 +1,25 @@
|
|||
# Class: icinga2::client::install
|
||||
# Class: icinga2::nrpe::install
|
||||
#
|
||||
# This subclass installs NRPE and Nagios plugin packages on Icinga client machines.
|
||||
#
|
||||
|
||||
class icinga2::client::install inherits icinga2::client {
|
||||
class icinga2::nrpe::install inherits icinga2::nrpe {
|
||||
|
||||
include icinga2::client
|
||||
include icinga2::nrpe
|
||||
#Apply our subclasses in the right order. Use the squiggly arrows (~>) to ensure that the
|
||||
#class left is applied before the class on the right and that it also refreshes the
|
||||
#class on the right.
|
||||
class {'icinga2::client::install::repos':} ~>
|
||||
class {'icinga2::client::install::packages':} ~>
|
||||
class {'icinga2::client::install::execs':}
|
||||
class {'icinga2::nrpe::install::repos':} ~>
|
||||
class {'icinga2::nrpe::install::packages':} ~>
|
||||
class {'icinga2::nrpe::install::execs':}
|
||||
}
|
||||
|
||||
##################
|
||||
#Package repositories
|
||||
##################
|
||||
class icinga2::client::install::repos inherits icinga2::client {
|
||||
class icinga2::nrpe::install::repos inherits icinga2::nrpe {
|
||||
|
||||
include icinga2::client
|
||||
include icinga2::nrpe
|
||||
#repository resources here
|
||||
|
||||
}
|
||||
|
@ -27,9 +27,9 @@ class icinga2::client::install::repos inherits icinga2::client {
|
|||
##################
|
||||
# Packages
|
||||
##################
|
||||
class icinga2::client::install::packages inherits icinga2::client {
|
||||
class icinga2::nrpe::install::packages inherits icinga2::nrpe {
|
||||
|
||||
include icinga2::client
|
||||
include icinga2::nrpe
|
||||
#Install the packages we specified in the ::params class:
|
||||
package {$icinga2::params::icinga2_client_packages:
|
||||
ensure => installed,
|
||||
|
@ -42,7 +42,7 @@ class icinga2::client::install::packages inherits icinga2::client {
|
|||
##################
|
||||
# Execs
|
||||
##################
|
||||
class icinga2::client::install::execs {
|
||||
class icinga2::nrpe::install::execs {
|
||||
|
||||
#exec resources here
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Define icinga2::client::plugin
|
||||
# Define icinga2::nrpe::plugin
|
||||
#
|
||||
# This defined type distributes .
|
||||
#
|
||||
|
@ -14,7 +14,7 @@
|
|||
# for more info on what formats of URLs you can use to specify which files
|
||||
# you want to distribute.
|
||||
|
||||
define icinga2::client::plugin (
|
||||
define icinga2::nrpe::plugin (
|
||||
$plugin_name = $name,
|
||||
$nrpe_plugin_liddir = $icinga2::params::nrpe_plugin_liddir,
|
||||
$source_file = undef,
|
|
@ -1,12 +1,12 @@
|
|||
# Class: icinga2::client::service
|
||||
# Class: icinga2::nrpe::service
|
||||
#
|
||||
# This class manges the daemons/services for the server components of Icinga.
|
||||
#
|
||||
# Parameters:
|
||||
|
||||
class icinga2::client::service inherits icinga2::client {
|
||||
class icinga2::nrpe::service inherits icinga2::nrpe {
|
||||
|
||||
include icinga2::client
|
||||
include icinga2::nrpe
|
||||
|
||||
#Service resource for NRPE.
|
||||
#This references the daemon name we defined in the icinga2::params class based on the OS:
|
||||
|
@ -14,7 +14,7 @@ class icinga2::client::service inherits icinga2::client {
|
|||
ensure => running,
|
||||
enable => true, #Enable the service to start on system boot
|
||||
require => Package[$icinga2::params::icinga2_client_packages],
|
||||
subscribe => Class['icinga2::client::config'], #Subscribe to the client::config class so the service gets restarted if any config files change
|
||||
subscribe => Class['icinga2::nrpe::config'], #Subscribe to the client::config class so the service gets restarted if any config files change
|
||||
}
|
||||
|
||||
}
|
|
@ -29,7 +29,7 @@
|
|||
# LOG FACILITY
|
||||
# The syslog facility that should be used for logging purposes.
|
||||
|
||||
log_facility=<%= scope.lookupvar('icinga2::client::nrpe_log_facility') %>
|
||||
log_facility=<%= scope.lookupvar('icinga2::nrpe::nrpe_log_facility') %>
|
||||
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ log_facility=<%= scope.lookupvar('icinga2::client::nrpe_log_facility') %>
|
|||
# number. The file is only written if the NRPE daemon is started by the root
|
||||
# user and is running in standalone mode.
|
||||
|
||||
pid_file=<%= scope.lookupvar('icinga2::client::nrpe_pid_file_path') %>
|
||||
pid_file=<%= scope.lookupvar('icinga2::nrpe::nrpe_pid_file_path') %>
|
||||
|
||||
|
||||
# PORT NUMBER
|
||||
|
@ -46,7 +46,7 @@ pid_file=<%= scope.lookupvar('icinga2::client::nrpe_pid_file_path') %>
|
|||
# NOTE: This must be a non-priviledged port (i.e. > 1024).
|
||||
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
|
||||
|
||||
server_port=<%= scope.lookupvar('icinga2::client::nrpe_listen_port') %>
|
||||
server_port=<%= scope.lookupvar('icinga2::nrpe::nrpe_listen_port') %>
|
||||
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ server_port=<%= scope.lookupvar('icinga2::client::nrpe_listen_port') %>
|
|||
#
|
||||
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
|
||||
|
||||
nrpe_user=<%= scope.lookupvar('icinga2::client::nrpe_user') %>
|
||||
nrpe_user=<%= scope.lookupvar('icinga2::nrpe::nrpe_user') %>
|
||||
|
||||
|
||||
|
||||
|
@ -75,7 +75,7 @@ nrpe_user=<%= scope.lookupvar('icinga2::client::nrpe_user') %>
|
|||
#
|
||||
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
|
||||
|
||||
nrpe_group=<%= scope.lookupvar('icinga2::client::nrpe_group') %>
|
||||
nrpe_group=<%= scope.lookupvar('icinga2::nrpe::nrpe_group') %>
|
||||
|
||||
|
||||
|
||||
|
@ -92,7 +92,7 @@ nrpe_group=<%= scope.lookupvar('icinga2::client::nrpe_group') %>
|
|||
#
|
||||
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
|
||||
|
||||
allowed_hosts=<%= scope.lookupvar('icinga2::client::nrpe_allowed_hosts').join(',') %>
|
||||
allowed_hosts=<%= scope.lookupvar('icinga2::nrpe::nrpe_allowed_hosts').join(',') %>
|
||||
|
||||
|
||||
|
||||
|
@ -138,7 +138,7 @@ dont_blame_nrpe=0
|
|||
# syslog facility.
|
||||
# Values: 0=debugging off, 1=debugging on
|
||||
|
||||
debug=<%= scope.lookupvar('icinga2::client::nrpe_debug_level') %>
|
||||
debug=<%= scope.lookupvar('icinga2::nrpe::nrpe_debug_level') %>
|
||||
|
||||
|
||||
|
||||
|
@ -146,7 +146,7 @@ debug=<%= scope.lookupvar('icinga2::client::nrpe_debug_level') %>
|
|||
# This specifies the maximum number of seconds that the NRPE daemon will
|
||||
# allow plugins to finish executing before killing them off.
|
||||
|
||||
command_timeout=<%= scope.lookupvar('icinga2::client::nrpe_command_timeout') %>
|
||||
command_timeout=<%= scope.lookupvar('icinga2::nrpe::nrpe_command_timeout') %>
|
||||
|
||||
|
||||
|
||||
|
@ -157,7 +157,7 @@ command_timeout=<%= scope.lookupvar('icinga2::client::nrpe_command_timeout') %>
|
|||
# all network sessions are connected. This causes the nrpe daemons to
|
||||
# accumulate, eating system resources. Do not set this too low.
|
||||
|
||||
connection_timeout=<%= scope.lookupvar('icinga2::client::nrpe_connection_timeout') %>
|
||||
connection_timeout=<%= scope.lookupvar('icinga2::nrpe::nrpe_connection_timeout') %>
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue