2014-06-28 06:39:42 +02:00
|
|
|
# == Class: icinga2::params
|
|
|
|
#
|
|
|
|
# This class contains config options and settings for use elsewhere in the module.
|
|
|
|
#
|
|
|
|
# === Parameters
|
|
|
|
#
|
|
|
|
# See the inline comments.
|
|
|
|
#
|
|
|
|
|
|
|
|
class icinga2::params {
|
|
|
|
|
2014-07-05 21:31:16 +02:00
|
|
|
##############################
|
|
|
|
# Icinga 2 common parameters
|
|
|
|
##############################
|
|
|
|
|
|
|
|
#This section has parameters that are used by both the client and server subclasses
|
|
|
|
|
2014-07-05 21:31:48 +02:00
|
|
|
##################
|
|
|
|
# Icinga 2 common package parameters
|
2014-09-10 08:43:19 +02:00
|
|
|
case $::operatingsystem {
|
2014-09-14 04:28:38 +02:00
|
|
|
#CentOS systems:
|
2014-09-14 04:46:24 +02:00
|
|
|
'CentOS': {
|
2014-07-05 21:31:48 +02:00
|
|
|
#Pick the right package provider:
|
|
|
|
$package_provider = 'yum'
|
2014-09-14 04:46:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#Ubuntu systems:
|
2014-09-13 05:32:49 +02:00
|
|
|
'Ubuntu': {
|
2014-07-05 21:31:48 +02:00
|
|
|
#Pick the right package provider:
|
|
|
|
$package_provider = 'apt'
|
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-09-16 18:47:34 +02:00
|
|
|
#Debian systems:
|
|
|
|
'Debian': {
|
|
|
|
#Pick the right package provider:
|
|
|
|
$package_provider = 'apt'
|
|
|
|
}
|
|
|
|
|
2014-07-05 21:31:48 +02:00
|
|
|
#Fail if we're on any other OS:
|
2014-09-10 08:43:19 +02:00
|
|
|
default: { fail("${::operatingsystem} is not supported!") }
|
2014-07-05 21:31:48 +02:00
|
|
|
}
|
2014-06-29 06:25:51 +02:00
|
|
|
|
2014-07-05 21:32:37 +02:00
|
|
|
##############################
|
|
|
|
# Icinga 2 server parameters
|
|
|
|
##############################
|
|
|
|
|
2014-06-29 06:25:51 +02:00
|
|
|
#Whether to manage the package repositories
|
2014-08-22 05:44:28 +02:00
|
|
|
$manage_repos = true
|
2014-10-03 11:26:10 +02:00
|
|
|
$use_debmon_repo = false
|
2014-06-30 08:04:56 +02:00
|
|
|
$server_db_type = 'pgsql'
|
2014-09-16 05:23:11 +02:00
|
|
|
$install_mail_utils_package = false
|
2014-07-05 21:21:41 +02:00
|
|
|
|
2014-07-03 04:53:53 +02:00
|
|
|
#Database paramters
|
|
|
|
$db_name = 'icinga2_data'
|
|
|
|
$db_user = 'icinga2'
|
|
|
|
$db_password = 'password'
|
|
|
|
$db_host = 'localhost'
|
2014-08-22 04:41:14 +02:00
|
|
|
$db_port = '5432'
|
2014-07-05 21:21:41 +02:00
|
|
|
|
2014-09-26 21:12:45 +02:00
|
|
|
#Whether to install the plugin packages when the icinga2::server class is applied:
|
|
|
|
$server_install_nagios_plugins = true
|
2014-07-21 02:04:25 +02:00
|
|
|
|
2014-09-30 23:35:36 +02:00
|
|
|
#What Icinga 2 features should be enabled when icinga2::server::features class is applied:
|
|
|
|
$server_enabled_features = ['checker','notification']
|
2014-10-02 12:56:46 +02:00
|
|
|
$server_disabled_features = []
|
2014-09-30 23:35:36 +02:00
|
|
|
|
2014-06-29 06:25:51 +02:00
|
|
|
##############################
|
|
|
|
# Icinga 2 server package parameters
|
|
|
|
|
2014-07-05 21:31:16 +02:00
|
|
|
#Pick the right package parameters based on the OS:
|
2014-09-10 08:43:19 +02:00
|
|
|
case $::operatingsystem {
|
2014-09-14 04:28:38 +02:00
|
|
|
#CentOS systems:
|
2014-09-13 05:25:32 +02:00
|
|
|
'CentOS': {
|
2014-09-14 05:10:11 +02:00
|
|
|
case $::operatingsystemmajrelease {
|
2014-11-10 21:06:34 +01:00
|
|
|
'5': {
|
|
|
|
#Icinga 2 server package
|
|
|
|
$icinga2_server_package = 'icinga2'
|
|
|
|
$icinga2_server_plugin_packages = ['nagios-plugins-nrpe', 'nagios-plugins-all', 'nagios-plugins-openmanage', 'nagios-plugins-check-updates']
|
|
|
|
$icinga2_server_mail_package = 'mailx'
|
|
|
|
}
|
2014-09-14 05:10:11 +02:00
|
|
|
'6': {
|
|
|
|
#Icinga 2 server package
|
|
|
|
$icinga2_server_package = 'icinga2'
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_server_plugin_packages = ['nagios-plugins-nrpe', 'nagios-plugins-all', 'nagios-plugins-openmanage', 'nagios-plugins-check-updates']
|
2014-09-16 05:23:11 +02:00
|
|
|
$icinga2_server_mail_package = 'mailx'
|
2014-09-14 05:10:11 +02:00
|
|
|
}
|
|
|
|
'7': {
|
|
|
|
#Icinga 2 server package
|
|
|
|
$icinga2_server_package = 'icinga2'
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_server_plugin_packages = ['nagios-plugins-nrpe', 'nagios-plugins-all', 'nagios-plugins-openmanage', 'nagios-plugins-check-updates']
|
2014-09-16 05:23:11 +02:00
|
|
|
$icinga2_server_mail_package = 'mailx'
|
2014-09-14 05:10:11 +02:00
|
|
|
}
|
|
|
|
#Fail if we're on any other CentOS release:
|
|
|
|
default: { fail("${::operatingsystemmajrelease} is not a supported CentOS release!") }
|
|
|
|
}
|
2014-06-29 06:25:51 +02:00
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
|
|
|
#Ubuntu systems:
|
2014-09-13 05:32:49 +02:00
|
|
|
'Ubuntu': {
|
2014-09-10 08:43:19 +02:00
|
|
|
case $::operatingsystemrelease {
|
2014-07-06 07:00:20 +02:00
|
|
|
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
|
|
|
|
'12.04': {
|
|
|
|
$icinga2_server_package = 'icinga2'
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_server_plugin_packages = ['nagios-plugins', 'nagios-plugins-basic', 'nagios-plugins-standard', 'nagios-snmp-plugins', 'nagios-plugins-extra', 'nagios-nrpe-plugin']
|
2014-09-16 05:23:11 +02:00
|
|
|
$icinga2_server_mail_package = 'mailutils'
|
2014-09-14 00:32:30 +02:00
|
|
|
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
|
|
|
$server_plugin_package_install_options = '--no-install-recommends'
|
2014-07-06 07:00:20 +02:00
|
|
|
}
|
|
|
|
#...but 14.04 does:
|
|
|
|
'14.04': {
|
|
|
|
$icinga2_server_package = 'icinga2'
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_server_plugin_packages = [ 'nagios-plugins', 'nagios-plugins-basic', 'nagios-plugins-common', 'nagios-plugins-standard', 'nagios-snmp-plugins', 'nagios-plugins-extra', 'nagios-plugins-contrib', 'nagios-nrpe-plugin']
|
2014-09-16 05:23:11 +02:00
|
|
|
$icinga2_server_mail_package = 'mailutils'
|
2014-09-14 00:32:30 +02:00
|
|
|
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
|
|
|
$server_plugin_package_install_options = '--no-install-recommends'
|
2014-07-06 07:00:20 +02:00
|
|
|
}
|
2014-09-14 05:10:11 +02:00
|
|
|
#Fail if we're on any other Ubuntu release:
|
2014-09-14 06:54:37 +02:00
|
|
|
default: { fail("${::operatingsystemmajrelease} is not a supported Ubuntu release version!") }
|
2014-08-17 23:22:23 +02:00
|
|
|
}
|
2014-06-29 06:25:51 +02:00
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-09-16 18:47:34 +02:00
|
|
|
#Debian systems:
|
|
|
|
'Debian': {
|
|
|
|
case $::operatingsystemmajrelease {
|
|
|
|
#Only tested on Debian7
|
|
|
|
'7': {
|
|
|
|
$icinga2_server_package = 'icinga2'
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_server_plugin_packages = ['nagios-plugins', 'nagios-plugins-basic', 'nagios-plugins-standard', 'nagios-snmp-plugins', 'nagios-plugins-contrib', 'nagios-nrpe-plugin']
|
2014-09-16 18:47:34 +02:00
|
|
|
$icinga2_server_mail_package = 'mailutils'
|
|
|
|
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
|
|
|
$server_plugin_package_install_options = '--no-install-recommends'
|
|
|
|
}
|
|
|
|
#Fail if we're on any other Debian release:
|
|
|
|
default: { fail("${::operatingsystemmajrelease} is not a supported Debian release version!") }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-29 06:25:51 +02:00
|
|
|
#Fail if we're on any other OS:
|
2014-09-10 08:43:19 +02:00
|
|
|
default: { fail("${::operatingsystem} is not supported!") }
|
2014-06-29 06:25:51 +02:00
|
|
|
}
|
|
|
|
|
2014-07-05 22:57:47 +02:00
|
|
|
##############################
|
|
|
|
# Icinga 2 server config parameters
|
|
|
|
|
2014-09-10 08:43:19 +02:00
|
|
|
case $::operatingsystem {
|
2014-09-14 04:28:38 +02:00
|
|
|
#CentOS systems:
|
2014-09-13 05:25:32 +02:00
|
|
|
'CentOS': {
|
2014-07-06 00:06:41 +02:00
|
|
|
#Settings for /etc/icinga2/:
|
|
|
|
$etc_icinga2_owner = 'icinga'
|
|
|
|
$etc_icinga2_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_mode = '0750'
|
2014-07-06 00:06:41 +02:00
|
|
|
#Settings for /etc/icinga2/icinga2.conf:
|
|
|
|
$etc_icinga2_icinga2_conf_owner = 'icinga'
|
|
|
|
$etc_icinga2_icinga2_conf_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_icinga2_conf_mode = '0640'
|
2014-07-06 00:06:41 +02:00
|
|
|
#Settings for /etc/icinga2/conf.d/
|
|
|
|
$etc_icinga2_confd_owner = 'icinga'
|
|
|
|
$etc_icinga2_confd_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_confd_mode = '0750'
|
2014-07-06 00:06:41 +02:00
|
|
|
#Settings for /etc/icinga2/features-available/:
|
|
|
|
$etc_icinga2_features_available_owner = 'icinga'
|
|
|
|
$etc_icinga2_features_available_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_features_available_mode = '0750'
|
2014-07-06 00:06:41 +02:00
|
|
|
#Settings for /etc/icinga2/features-enabled/:
|
|
|
|
$etc_icinga2_features_enabled_owner = 'icinga'
|
|
|
|
$etc_icinga2_features_enabled_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_features_enabled_mode = '0750'
|
2014-07-06 00:17:37 +02:00
|
|
|
#Settings for /etc/icinga2/pki/:
|
|
|
|
$etc_icinga2_pki_owner = 'icinga'
|
|
|
|
$etc_icinga2_pki_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_pki_mode = '0750'
|
2014-07-06 00:17:37 +02:00
|
|
|
#Settings for /etc/icinga2/scripts/:
|
|
|
|
$etc_icinga2_scripts_owner = 'icinga'
|
|
|
|
$etc_icinga2_scripts_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_scripts_mode = '0750'
|
2014-07-06 00:06:41 +02:00
|
|
|
#Settings for /etc/icinga2/zones.d/:
|
|
|
|
$etc_icinga2_zonesd_owner = 'icinga'
|
|
|
|
$etc_icinga2_zonesd_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_zonesd_mode = '0750'
|
2014-07-06 01:33:10 +02:00
|
|
|
#Settings for /etc/icinga2/objects/:
|
|
|
|
$etc_icinga2_obejcts_owner = 'icinga'
|
|
|
|
$etc_icinga2_obejcts_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_obejcts_mode = '0750'
|
2014-07-06 01:33:10 +02:00
|
|
|
#Settings for subdirectories of /etc/icinga2/objects/:
|
|
|
|
$etc_icinga2_obejcts_sub_dir_owner = 'icinga'
|
|
|
|
$etc_icinga2_obejcts_sub_dir_group = 'icinga'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_obejcts_sub_dir_mode = '0750'
|
2014-07-06 00:06:41 +02:00
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-09-16 18:47:34 +02:00
|
|
|
#Ubuntu and Debian systems:
|
|
|
|
/(Ubuntu|Debian)/: {
|
2014-07-06 00:06:41 +02:00
|
|
|
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for /etc/icinga2/:
|
|
|
|
$etc_icinga2_owner = 'root'
|
|
|
|
$etc_icinga2_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_mode = '0755'
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for /etc/icinga2/icinga2.conf:
|
|
|
|
$etc_icinga2_icinga2_conf_owner = 'root'
|
|
|
|
$etc_icinga2_icinga2_conf_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_icinga2_conf_mode = '0644'
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for /etc/icinga2/conf.d/
|
|
|
|
$etc_icinga2_confd_owner = 'root'
|
|
|
|
$etc_icinga2_confd_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_confd_mode = '0755'
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for /etc/icinga2/features-available/:
|
|
|
|
$etc_icinga2_features_available_owner = 'root'
|
|
|
|
$etc_icinga2_features_available_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_features_available_mode = '0755'
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for /etc/icinga2/features-enabled/:
|
|
|
|
$etc_icinga2_features_enabled_owner = 'root'
|
|
|
|
$etc_icinga2_features_enabled_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_features_enabled_mode = '0755'
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for /etc/icinga2/pki/:
|
|
|
|
$etc_icinga2_pki_owner = 'root'
|
|
|
|
$etc_icinga2_pki_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_pki_mode = '0755'
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for /etc/icinga2/scripts/:
|
|
|
|
$etc_icinga2_scripts_owner = 'root'
|
|
|
|
$etc_icinga2_scripts_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_scripts_mode = '0755'
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for /etc/icinga2/zones.d/:
|
|
|
|
$etc_icinga2_zonesd_owner = 'root'
|
|
|
|
$etc_icinga2_zonesd_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_zonesd_mode = '0755'
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for /etc/icinga2/objects/:
|
|
|
|
$etc_icinga2_obejcts_owner = 'root'
|
|
|
|
$etc_icinga2_obejcts_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_obejcts_mode = '0755'
|
2014-09-16 18:47:34 +02:00
|
|
|
#Settings for subdirectories of /etc/icinga2/objects/:
|
|
|
|
$etc_icinga2_obejcts_sub_dir_owner = 'root'
|
|
|
|
$etc_icinga2_obejcts_sub_dir_group = 'root'
|
2014-09-26 21:12:45 +02:00
|
|
|
$etc_icinga2_obejcts_sub_dir_mode = '0755'
|
2014-07-06 00:06:41 +02:00
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-07-06 00:06:41 +02:00
|
|
|
#Fail if we're on any other OS:
|
2014-09-10 08:43:19 +02:00
|
|
|
default: { fail("${::operatingsystem} is not supported!") }
|
2014-07-06 00:06:41 +02:00
|
|
|
}
|
|
|
|
|
2014-07-06 00:56:55 +02:00
|
|
|
##################
|
2014-09-14 04:46:24 +02:00
|
|
|
# Icinga 2 server service settings
|
2014-07-06 00:56:55 +02:00
|
|
|
|
2014-09-10 08:43:19 +02:00
|
|
|
case $::operatingsystem {
|
2014-07-06 00:58:05 +02:00
|
|
|
#Icinga 2 server daemon names for Red Had/CentOS systems:
|
2014-09-13 05:25:32 +02:00
|
|
|
'CentOS': {
|
2014-09-14 05:10:11 +02:00
|
|
|
case $::operatingsystemmajrelease {
|
2014-11-12 20:30:21 +01:00
|
|
|
'5': {
|
|
|
|
$icinga2_server_service_name = 'icinga2'
|
|
|
|
}
|
2014-09-14 05:10:11 +02:00
|
|
|
'6': {
|
|
|
|
$icinga2_server_service_name = 'icinga2'
|
|
|
|
}
|
|
|
|
'7': {
|
|
|
|
$icinga2_server_service_name = 'icinga2'
|
|
|
|
}
|
|
|
|
#Fail if we're on any other CentOS release:
|
|
|
|
default: { fail("${::operatingsystemmajrelease} is not a supported CentOS release!") }
|
|
|
|
}
|
2014-07-06 00:58:05 +02:00
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-09-14 01:50:41 +02:00
|
|
|
#Icinga 2 server daemon names for Ubuntu systems:
|
2014-09-13 05:32:49 +02:00
|
|
|
'Ubuntu': {
|
2014-09-14 05:10:11 +02:00
|
|
|
case $::operatingsystemmajrelease {
|
|
|
|
'12.04': {
|
|
|
|
$icinga2_server_service_name = 'icinga2'
|
|
|
|
}
|
|
|
|
'14.04': {
|
|
|
|
$icinga2_server_service_name = 'icinga2'
|
|
|
|
}
|
|
|
|
#Fail if we're on any other Ubuntu release:
|
2014-09-14 06:54:37 +02:00
|
|
|
default: { fail("${::operatingsystemmajrelease} is not a supported Ubuntu release version!") }
|
2014-09-14 05:10:11 +02:00
|
|
|
}
|
2014-07-06 00:58:05 +02:00
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-09-16 18:47:34 +02:00
|
|
|
#Icinga 2 server daemon names for Debian systems:
|
|
|
|
'Debian': {
|
|
|
|
case $::operatingsystemmajrelease {
|
|
|
|
'7': {
|
|
|
|
$icinga2_server_service_name = 'icinga2'
|
|
|
|
}
|
|
|
|
#Fail if we're on any other Debian release:
|
|
|
|
default: { fail("${::operatingsystemmajrelease} is not a supported Debian release version!") }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-06 00:58:05 +02:00
|
|
|
#Fail if we're on any other OS:
|
2014-09-10 08:43:19 +02:00
|
|
|
default: { fail("${::operatingsystem} is not supported!") }
|
2014-07-06 00:58:05 +02:00
|
|
|
}
|
|
|
|
|
2014-07-05 21:33:53 +02:00
|
|
|
##############################
|
|
|
|
# Icinga 2 client parameters
|
|
|
|
##############################
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-07-05 21:34:58 +02:00
|
|
|
##################
|
2014-09-14 04:46:24 +02:00
|
|
|
# Icinga 2 client settings
|
2014-07-05 21:34:58 +02:00
|
|
|
$nrpe_listen_port = '5666'
|
|
|
|
$nrpe_log_facility = 'daemon'
|
|
|
|
$nrpe_debug_level = '0'
|
|
|
|
#in seconds:
|
|
|
|
$nrpe_command_timeout = '60'
|
|
|
|
#in seconds:
|
|
|
|
$nrpe_connection_timeout = '300'
|
2014-09-14 04:46:24 +02:00
|
|
|
#Note: because we use .join in the nrpe.cfg.erb template, this value *must* be an array
|
2014-07-05 21:34:58 +02:00
|
|
|
$nrpe_allowed_hosts = ['127.0.0.1',]
|
2014-10-02 00:50:35 +02:00
|
|
|
#Determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed
|
2014-09-30 14:13:54 +02:00
|
|
|
# *** ENABLING THIS OPTION IS A SECURITY RISK! ***
|
|
|
|
# Defaults to NOT allow command arguments
|
|
|
|
$allow_command_argument_processing = '0'
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-11-06 23:03:45 +01:00
|
|
|
# Whether or not to purge nrpe config files NOT managed by Puppet.
|
|
|
|
$nrpe_purge_unmanaged = false
|
|
|
|
|
2014-09-10 08:43:19 +02:00
|
|
|
case $::operatingsystem {
|
2014-07-05 21:34:58 +02:00
|
|
|
#File and template variable names for Red Had/CentOS systems:
|
2014-09-13 05:25:32 +02:00
|
|
|
'CentOS': {
|
2014-09-26 21:12:45 +02:00
|
|
|
$nrpe_config_basedir = '/etc/nagios'
|
|
|
|
$nrpe_plugin_libdir = '/usr/lib64/nagios/plugins'
|
2014-10-03 12:53:36 +02:00
|
|
|
$checkplugin_libdir = '/usr/lib64/nagios/plugins'
|
2014-09-26 21:12:45 +02:00
|
|
|
$nrpe_pid_file_path = '/var/run/nrpe/nrpe.pid'
|
|
|
|
$nrpe_user = 'nrpe'
|
|
|
|
$nrpe_group = 'nrpe'
|
2014-07-05 21:34:58 +02:00
|
|
|
}
|
2014-09-14 01:50:41 +02:00
|
|
|
#File and template variable names for Ubuntu systems:
|
2014-09-13 05:32:49 +02:00
|
|
|
'Ubuntu': {
|
2014-09-26 21:12:45 +02:00
|
|
|
$nrpe_config_basedir = '/etc/nagios'
|
|
|
|
$nrpe_plugin_libdir = '/usr/lib/nagios/plugins'
|
2014-10-03 12:38:14 +02:00
|
|
|
$checkplugin_libdir = '/usr/lib/nagios/plugins'
|
2014-09-26 21:12:45 +02:00
|
|
|
$nrpe_pid_file_path = '/var/run/nagios/nrpe.pid'
|
|
|
|
$nrpe_user = 'nagios'
|
|
|
|
$nrpe_group = 'nagios'
|
2014-07-05 21:34:58 +02:00
|
|
|
}
|
2014-09-16 18:47:34 +02:00
|
|
|
#File and template variable names for Ubuntu systems:
|
|
|
|
'Debian': {
|
2014-09-26 21:12:45 +02:00
|
|
|
$nrpe_config_basedir = '/etc/nagios'
|
|
|
|
$nrpe_plugin_libdir = '/usr/lib/nagios/plugins'
|
2014-10-03 12:38:14 +02:00
|
|
|
$checkplugin_libdir = '/usr/lib/nagios/plugins'
|
2014-09-26 21:12:45 +02:00
|
|
|
$nrpe_pid_file_path = '/var/run/nagios/nrpe.pid'
|
|
|
|
$nrpe_user = 'nagios'
|
|
|
|
$nrpe_group = 'nagios'
|
2014-09-16 18:47:34 +02:00
|
|
|
}
|
2014-07-05 21:34:58 +02:00
|
|
|
#Fail if we're on any other OS:
|
2014-09-10 08:43:19 +02:00
|
|
|
default: { fail("${::operatingsystem} is not supported!") }
|
2014-07-05 21:34:58 +02:00
|
|
|
}
|
2014-07-05 21:33:53 +02:00
|
|
|
|
2014-07-05 21:38:24 +02:00
|
|
|
##################
|
|
|
|
# Icinga 2 client package parameters
|
2014-09-10 08:43:19 +02:00
|
|
|
case $::operatingsystem {
|
2014-09-14 04:28:38 +02:00
|
|
|
#CentOS systems:
|
2014-09-13 05:25:32 +02:00
|
|
|
'CentOS': {
|
2014-09-14 05:10:11 +02:00
|
|
|
case $::operatingsystemmajrelease {
|
2014-11-10 20:55:53 +01:00
|
|
|
'5': {
|
|
|
|
#Pick the right list of client packages:
|
|
|
|
$icinga2_client_packages = ['nrpe', 'nagios-plugins-nrpe', 'nagios-plugins-all', 'nagios-plugins-openmanage', 'nagios-plugins-check-updates']
|
|
|
|
}
|
2014-09-14 05:10:11 +02:00
|
|
|
'6': {
|
|
|
|
#Pick the right list of client packages:
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_client_packages = ['nrpe', 'nagios-plugins-nrpe', 'nagios-plugins-all', 'nagios-plugins-openmanage', 'nagios-plugins-check-updates']
|
2014-09-14 05:10:11 +02:00
|
|
|
}
|
|
|
|
'7': {
|
|
|
|
#Pick the right list of client packages:
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_client_packages = ['nrpe', 'nagios-plugins-nrpe', 'nagios-plugins-all', 'nagios-plugins-openmanage', 'nagios-plugins-check-updates']
|
2014-09-14 05:10:11 +02:00
|
|
|
}
|
|
|
|
#Fail if we're on any other CentOS release:
|
2014-09-14 06:54:37 +02:00
|
|
|
default: { fail("${::operatingsystemmajrelease} is not a supported CentOS release version!") }
|
2014-09-14 05:10:11 +02:00
|
|
|
}
|
|
|
|
|
2014-09-14 04:46:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#Ubuntu systems:
|
2014-09-13 05:32:49 +02:00
|
|
|
'Ubuntu': {
|
2014-09-10 08:43:19 +02:00
|
|
|
case $::operatingsystemrelease {
|
2014-07-05 21:38:24 +02:00
|
|
|
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
|
|
|
|
'12.04': {
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_client_packages = ['nagios-nrpe-server', 'nagios-plugins', 'nagios-plugins-basic', 'nagios-plugins-standard', 'nagios-snmp-plugins', 'nagios-plugins-extra', 'nagios-nrpe-plugin']
|
2014-09-14 00:32:30 +02:00
|
|
|
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
|
|
|
$client_plugin_package_install_options = '--no-install-recommends'
|
2014-07-05 21:38:24 +02:00
|
|
|
}
|
|
|
|
#...but 14.04 does:
|
|
|
|
'14.04': {
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_client_packages = ['nagios-nrpe-server', 'nagios-plugins', 'nagios-plugins-basic', 'nagios-plugins-common', 'nagios-plugins-standard', 'nagios-snmp-plugins', 'nagios-plugins-extra', 'nagios-plugins-contrib', 'nagios-nrpe-plugin']
|
2014-09-14 00:32:30 +02:00
|
|
|
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
|
|
|
$client_plugin_package_install_options = '--no-install-recommends'
|
2014-07-05 21:38:24 +02:00
|
|
|
}
|
2014-09-14 05:10:11 +02:00
|
|
|
#Fail if we're on any other Ubuntu release:
|
2014-09-14 06:54:37 +02:00
|
|
|
default: { fail("${::operatingsystemmajrelease} is not a supported Ubuntu release version!") }
|
2014-07-05 21:38:24 +02:00
|
|
|
}
|
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-09-16 18:47:34 +02:00
|
|
|
#Debian systems:
|
|
|
|
'Debian': {
|
|
|
|
case $::operatingsystemmajrelease {
|
|
|
|
'7': {
|
2014-09-26 21:12:45 +02:00
|
|
|
$icinga2_client_packages = ['nagios-nrpe-server', 'nagios-plugins', 'nagios-plugins-basic', 'nagios-plugins-standard', 'nagios-snmp-plugins', 'nagios-plugins-contrib', 'nagios-nrpe-plugin']
|
2014-09-16 18:47:34 +02:00
|
|
|
#Specify '--no-install-recommends' so we don't inadvertently get Nagios 3 installed; it comes as a recommended package with most of the plugin packages:
|
|
|
|
$client_plugin_package_install_options = '--no-install-recommends'
|
|
|
|
}
|
|
|
|
#Fail if we're on any other Debian release:
|
|
|
|
default: { fail("${::operatingsystemmajrelease} is not a supported Debian release version!") }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-05 21:38:24 +02:00
|
|
|
#Fail if we're on any other OS:
|
2014-09-10 08:43:19 +02:00
|
|
|
default: { fail("${::operatingsystem} is not supported!") }
|
2014-07-05 21:38:24 +02:00
|
|
|
}
|
|
|
|
|
2014-07-05 21:35:17 +02:00
|
|
|
##################
|
|
|
|
# Icinga 2 client service parameters
|
2014-09-10 08:43:19 +02:00
|
|
|
case $::operatingsystem {
|
2014-07-05 21:35:17 +02:00
|
|
|
#Daemon names for Red Had/CentOS systems:
|
2014-09-13 05:25:32 +02:00
|
|
|
'CentOS': {
|
2014-07-05 21:35:17 +02:00
|
|
|
$nrpe_daemon_name = 'nrpe'
|
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-09-14 01:50:41 +02:00
|
|
|
#Daemon names for Ubuntu systems:
|
2014-09-13 05:32:49 +02:00
|
|
|
'Ubuntu': {
|
2014-07-05 21:35:17 +02:00
|
|
|
$nrpe_daemon_name = 'nagios-nrpe-server'
|
|
|
|
}
|
2014-09-14 04:46:24 +02:00
|
|
|
|
2014-09-16 18:47:34 +02:00
|
|
|
#Daemon names for Debian systems:
|
|
|
|
'Debian': {
|
|
|
|
$nrpe_daemon_name = 'nagios-nrpe-server'
|
|
|
|
}
|
|
|
|
|
2014-07-05 21:35:17 +02:00
|
|
|
#Fail if we're on any other OS:
|
2014-09-10 08:43:19 +02:00
|
|
|
default: { fail("${::operatingsystem} is not supported!") }
|
2014-07-05 21:35:17 +02:00
|
|
|
}
|
|
|
|
|
2014-09-10 09:20:37 +02:00
|
|
|
}
|