Merge branch 'develop' into refactor/rename_client_to_nrpe

Merge the develop branch in so we can get the parameter that allows us to not install the plugin packages via the ::server class.
This commit is contained in:
Nick Chappell 2014-07-20 17:23:11 -07:00
commit 8d10c5c871
4 changed files with 39 additions and 7 deletions

View file

@ -7,7 +7,7 @@ The module has only been tested on [CentOS 6.5](http://www.centos.org/download/)
Currently, this module does not install or configure any web UIs for Icinga 2. This module also does not install or configure a mail transfer agent (MTA) to send outgoing alert emails.
While NRPE is required for Icinga 2 to check non-network-reachble things on client machines (CPU, load average, etc.), this module itself doesn't have any dependencies between the server component (the `icinga2::server` class) and client component (the `icinga2::client` class). Either one can be used independently of the other.
While NRPE is required for Icinga 2 to check non-network-reachble things on client machines (CPU, load average, etc.), this module itself doesn't have any dependencies between the server component (the `icinga2::server` class) and client component (the `icinga2::nrpe` class). Either one can be used independently of the other.
###Requirements
@ -82,12 +82,38 @@ 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`:
<pre>
#Install Icinga 2:
class { 'icinga2::server':
...
server_install_nagios_plugins => false,
...
}
</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.
####Client usage
To install NRPE and allow the local machine and Icinga 2 servers (or Icinga 1 or plain old Nagios servers) with various IP addresess to connect:
<pre>
class { 'icinga2::client':
class { 'icinga2::nrpe':
nrpe_allowed_hosts => ['10.0.1.79', '10.0.1.80', '10.0.1.85', '127.0.0.1'],
}
</pre>
**Note:** If you would like to install NRPE 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:
class { 'icinga2::server':
server_db_type => 'pgsql',
server_install_nagios_plugins => false,
}
</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.

View file

@ -48,6 +48,9 @@ class icinga2::params {
$db_password = 'password'
$db_host = 'localhost'
#Whether to install the plugin packages when the icinga2::server class is applied:
$server_install_nagios_plugins = 'true'
##############################
# Icinga 2 server package parameters

View file

@ -21,6 +21,7 @@ class icinga2::server (
$package_provider = $icinga2::params::package_provider,
$icinga2_server_package = $icinga2::params::icinga2_server_package,
#$server_db_schema_path = $icinga2::params::server_db_schema_path
$server_install_nagios_plugins = $icinga2::params::server_install_nagios_plugins,
) inherits icinga2::params {
#Pick set the right path where we can find the DB schema based on the OS...

View file

@ -75,10 +75,12 @@ class icinga2::server::install::packages inherits icinga2::server {
provider => $package_provider,
}
#Install the Nagios plugins packages:
package {$icinga2_server_plugin_packages:
ensure => installed,
provider => $package_provider,
if $server_install_nagios_plugins == true {
#Install the Nagios plugins packages:
package {$icinga2_server_plugin_packages:
ensure => installed,
provider => $package_provider,
}
}
#Pick the right DB lib package name based on the database type the user selected: