From a04f079a6cbeec8e03f4fc67da3e6f843f0aeb77 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Tue, 25 Jul 2017 18:56:18 +0100 Subject: [PATCH 1/2] testing templates --- manifests/nagios/objects/template_rules.pp | 36 +++++- manifests/nagios/objects/templates.pp | 78 +++++++++++- templates/nagios/templates_cfg_rule.erb | 139 +++++++++++++++++++-- 3 files changed, 235 insertions(+), 18 deletions(-) diff --git a/manifests/nagios/objects/template_rules.pp b/manifests/nagios/objects/template_rules.pp index 947dc5b..4cbb711 100644 --- a/manifests/nagios/objects/template_rules.pp +++ b/manifests/nagios/objects/template_rules.pp @@ -19,8 +19,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # @summary Class manages /etc/nagios/conf.d/templates.cfg through concat. -# @example cd_nagios::objects::templates { $name: -# ng_template_object => 'service', +# @example cd_nagios::nagios::objects::templates { 'generic contact': +# ng_template_object => 'contact', +# ng_template_object_name => 'generic-contact', # } ################################################################################ class cd_nagios::nagios::objects::template_rules ( @@ -45,10 +46,37 @@ class cd_nagios::nagios::objects::template_rules ( notify => Service[$ng_service], } - # example rule - cd_nagios::objects::templates { 'generic contact': + # basic templates + cd_nagios::nagios::objects::templates { 'generic contact': ng_template_object => 'contact', ng_template_object_name => 'generic-contact', } + cd_nagios::nagios::objects::templates { 'generic-host': + ng_template_object => 'host', + ng_template_object_name => 'generic-host', + } + cd_nagios::nagios::objects::templates { 'linux-server': + ng_template_object => 'host', + ng_template_object_name => 'linux-server', + ng_template_object_use => 'generic-host', + ng_notification_options => 'd,u,r', + } + cd_nagios::nagios::objects::templates { 'windows-server': + ng_template_object => 'host', + ng_template_object_name => 'windows-server', + ng_template_object_use => 'generic-host', + ng_notification_options => 'd,u,r', + } + cd_nagios::nagios::objects::templates { 'generic-service': + ng_template_object => 'service', + ng_template_object_name => 'generic-service', + ng_max_check_attempts => '3', + ng_notification_options => 'w,u,c,r', + } + cd_nagios::nagios::objects::templates { 'local-service': + ng_template_object => 'service', + ng_template_object_name => 'generic-service', + ng_max_check_attempts => '4', + } } } diff --git a/manifests/nagios/objects/templates.pp b/manifests/nagios/objects/templates.pp index c9df353..ab7da62 100644 --- a/manifests/nagios/objects/templates.pp +++ b/manifests/nagios/objects/templates.pp @@ -20,7 +20,7 @@ # along with this program. If not, see . # @summary Define manages populates /etc/nagios/conf.d/templates.cfg. # @param [string] ng_template_object the object type for the templates. -# valid options are `contact`, `host` and `service`. +# Valid options are `contact`, `host` and `service`. # @param [string] ng_template_object_name populates the name field, # i.e. `generic-contact`, `generic-host`, `generic-service`. # @param [string] ng_svc_notification_period Period in which to send out @@ -41,7 +41,7 @@ # u = notify on UNREACHABLE host states, # r = notify on host recoveries (UP states), # f = notify when the host starts and stops flapping, -# s = snotify when host or service scheduled downtime starts and ends. +# s = notify when host or service scheduled downtime starts and ends. # n = none (the contact will not receive any type of host notifications). # @param [string] ng_service_notification_commands Command to use for # service event notification. Command must be defined in commands.cfg @@ -49,6 +49,54 @@ # host event notification. Command must be defined in commands.cfg. # @param [string] ng_object_register Whether to register the object to Nagios. # Since this is a template definition, we do not want to register those. +# @param [string] ng_template_object_use Which template to use for a given +# host or service definition, i.e. `generic-host`, `generic-service` etc. +# @param [string] ng_notifications_enabled Whether notifications are enabled. +# Valid options are `0` and `1`. +# @param [string] ng_event_handler_enabled Whether event handlers are enabled. +# Valid options are `0` and `1`. +# @param [string] ng_flap_detection_enabled Whether flap detection is enabled. +# Valid options are `0` and `1`. +# @param [string] ng_failure_prediction_enabled Whether failure prediction is +# enabled. Valid options are `0` and `1`. +# @param [string] ng_process_perf_data Whether to process performance data. +# Valid options are `0` and `1`. +# @param [string] ng_retain_status_information Whether to retain status +# information. Valid options are `0` and `1`. +# @param [string] ng_retain_nonstatus_information Whether to retain non-status +# information. Valid options are `0` and `1`. +# @param [string] ng_notification_period Which period in to send out +# notifications. for the defined service or host. +# @param [string] ng_notification_interval Whoe often (in minutes) we should +# resend notifications for the current status. +# @param [string] ng_check_period Which period in to run checks for the defined +# object. +# @param [string] ng_check_interval How often in minutes to check the defined +# object. +# @param [string] ng_retry_interval at what interval in minutes to schedule +# retries for the defined object. +# @param [string] ng_max_check_attempts how often to check the defined object +# maximal. +# @param [string] ng_notification_options see `ng_service_notification_options` +# and `ng_host_notification_options`. +# @param [string] ng_contact_groups contact groups for the defined oject. +# Specified contact group must exit in contact_groups +# @param [string] ng_active_checks_enabled Whether to enable active checks. +# Valid options are `0` and `1`. +# @param [string] ng_passive_checks_enabled Whether to enable passive checks. +# Valid options are `0` and `1`. +# @param [string] ng_parallelize_check Whether to parallelize checks +# Valid options are `0` and `1`. +# @param [string] ng_obsess_over_service Whether to obsess over the service. +# Valid options are `0` and `1`. +# @param [string] ng_check_freshness Whether to check freshness. +# Valid options are `0` and `1`. +# @param [string] ng_is_volatile Whether the service is volatile. +# Valid options are `0` and `1`. +# @param [string] ng_normal_check_interval How often to check the service +# under normal conditions. +# @param [string] ng_retry_check_interval Re-check the service every x minutes +# until a hard state can be determined. ################################################################################ define cd_nagios::nagios::objects::templates ( $ng_template_object = undef, @@ -60,6 +108,32 @@ $ng_host_notification_options = 'd,u,r,f,s', $ng_service_notification_commands = 'notify-service-by-email', $ng_host_notification_commands = 'notify-host-by-email', $ng_object_register = '0', +$ng_template_object_use = undef, +$ng_notifications_enabled = '1', +$ng_event_handler_enabled = '1', +$ng_flap_detection_enabled = '1', +$ng_failure_prediction_enabled = '1', +$ng_process_perf_data = '1', +$ng_retain_status_information = '1', +$ng_retain_nonstatus_information = '1', +$ng_notification_period = '24x7', +$ng_notification_interval = '30', +$ng_check_period = '24x7', +$ng_check_interval = '5', +$ng_retry_interval = '1', +$ng_max_check_attempts = '10', +$ng_check_command = 'check-host-alive', +$ng_notification_options = undef, +$ng_contact_groups = 'admins', +$ng_active_checks_enabled = '1', +$ng_passive_checks_enabled = '1', +$ng_parallelize_check = '1', +$ng_obsess_over_service = '1', +$ng_check_freshness = '0', +$ng_is_volatile = '0', +$ng_normal_check_interval = '10', +$ng_retry_check_interval = '2', + ) { $ng_nagios_server = $::cd_nagios::params::ng_nagios_server diff --git a/templates/nagios/templates_cfg_rule.erb b/templates/nagios/templates_cfg_rule.erb index b5a213d..2c00f14 100644 --- a/templates/nagios/templates_cfg_rule.erb +++ b/templates/nagios/templates_cfg_rule.erb @@ -1,18 +1,133 @@ <% if @ng_template_object == 'contact' -%> define <%= @ng_template_object %>{ - name <%= @ng_template_object_name %> ; - service_notification_period <%= @ng_svc_notification_period %> ; - host_notification_period <%= @ng_host_notification_period %> ; - service_notification_options <%= @ng_service_notification_options %> ; - host_notification_options <%= @ng_host_notification_options %> ; - service_notification_commands <%= @ng_service_notification_commands %> ; - host_notification_commands <%= @ng_host_notification_commands %> ; - register <%= @ng_object_register %> ; + name <%= @ng_template_object_name %> + service_notification_period <%= @ng_svc_notification_period %> + host_notification_period <%= @ng_host_notification_period %> + service_notification_options <%= @ng_service_notification_options %> + host_notification_options <%= @ng_host_notification_options %> + service_notification_commands <%= @ng_service_notification_commands %> + host_notification_commands <%= @ng_host_notification_commands %> + register <%= @ng_object_register %> } <% elsif @ng_template_object == 'host' -%> - -<% elsif @ng_template_object == 'service' -%> - - +<% if @ng_template_object_name == 'generic-host' -%> +define <%= @ng_template_object %>{ + name <%= @ng_template_object_name %> + notifications_enabled <%= @ng_notifications_enabled %> + event_handler_enabled <%= @ng_event_handler_enabled %> + flap_detection_enabled <%= @ng_flap_detection_enabled %> + failure_prediction_enabled <%= @ng_failure_prediction_enabled %> + process_perf_data <%= @ng_process_perf_data %> + retain_status_information <%= @ng_retain_status_information %> + retain_nonstatus_information <%= @ng_retain_nonstatus_information %> + notification_period <%= @ng_notification_period %> + register <%= @ng_object_register %> + } +<% end -%> +<% if @ng_template_object_name == 'linux-server' -%> +define <%= @ng_template_object %>{ + name <%= @ng_template_object_name %> + use <%= @ng_template_object_use %> + check_period <%= @ng_check_period %> + check_interval <%= @ng_check_interval %> + retry_interval <%= @ng_retry_interval %> + max_check_attempts <%= @ng_ng_max_check_attempts %> + check_command <%= @ng_check_command %> + notification_period <%= @ng_notification_period %> + notification_interval <%= @ng_notification_interval %> + notification_options <%= @ng_notification_options %> + contact_groups <%= @ng_contact_groups %> + hostgroups linux-servers + register <%= @ng_object_register %> + } +<% end %> +<% if @ng_template_object_name == 'windows-server' -%> +define <%= @ng_template_object %>{ + name <%= @ng_template_object_name %> + use <%= @ng_template_object_use %> + check_period <%= @ng_check_period %> + check_interval <%= @ng_check_interval %> + retry_interval <%= @ng_retry_interval %> + max_check_attempts <%= @ng_max_check_attempts %> + check_command <%= @ng_check_command %> + notification_period <%= @ng_notification_period %> + notification_interval <%= @ng_notification_interval %> + notification_options <%= @ng_notification_options %> + contact_groups <%= @ng_contact_groups %> + hostgroups windows-servers + register <%= @ng_object_register %> + } +<% end %> +<% if @ng_template_object_name == 'generic_printer' -%> +define <%= @ng_template_object %>{ + name <%= @ng_template_object_name %> + use <%= @ng_template_object_use %> + check_period <%= @ng_check_period %> + check_interval <%= @ng_check_interval %> + retry_interval <%= @ng_retry_interval %> + max_check_attempts <%= @ng_max_check_attempts %> + check_command <%= @ng_check_command %> + notification_period <%= @ng_notification_period %> + notification_interval <%= @ng_notification_interval %> + notification_options <%= @ng_notification_options %> + contact_groups <%= @ng_contact_groups %> + statusmap_image printer.png + register <%= @ng_object_register %> + } +<% end %> +<% if @ng_template_object_name == 'generic_switch' -%> +define <%= @ng_template_object %>{ + name <%= @ng_template_object_name %> + use <%= @ng_template_object_use %> + check_period <%= @ng_check_period %> + check_interval <%= @ng_check_interval %> + retry_interval <%= @ng_retry_interval %> + max_check_attempts <%= @ng_max_check_attempts %> + check_command <%= @ng_check_command %> + notification_period <%= @ng_notification_period %> + notification_interval <%= @ng_notification_interval %> + notification_options <%= @ng_notification_options %> + contact_groups <%= @ng_contact_groups %> + statusmap_image switch.png + register <%= @ng_object_register %> + } +<% end %> +<% elsif @ng_template_object == 'service' -%> +<% if @ng_template_object_name == 'generic-service' -%> +define <%= @ng_template_object %>{ + name <%= @ng_template_object_name %> + active_checks_enabled <%= @ng_active_checks_enabled %> + passive_checks_enabled <%= @ng_passive_checks_enabled %> + parallelize_check <%= @ng_parallelize_check %> + obsess_over_service <%= @ng_obsess_over_service %> + check_freshness <%= @ng_check_freshness %> + notifications_enabled <%= @ng_notifications_enabled %> + event_handler_enabled <%= @ng_event_handler_enabled %> + flap_detection_enabled <%= @ng_flap_detection_enabled %> + failure_prediction_enabled <%= @ng_failure_prediction_enabled %> + process_perf_data <%= @ng_process_perf_data %> + retain_status_information <%= @ng_retain_status_information %> + retain_nonstatus_information <%= @ng_retain_nonstatus_information %> + is_volatile <%= @ng_is_volatile %> + check_period <%= @ng_check_period %> + max_check_attempts <%= @ng_max_check_attempts %> + normal_check_interval <%= @ng_normal_check_interval %> + retry_check_interval <%= @ng_retry_check_interval %> + contact_groups <%= @ng_contact_groups %> + notification_interval <%= @ng_notification_interval %> + notification_period <%= @ng_notification_period %> + register <%= @ng_object_register %> + } +<% end -%> +<% if @ng_template_object_name == 'local-service' -%> +define <%= @ng_template_object %>{ + name <%= @ng_template_object_name %> + use <%= @ng_template_object_use %> + max_check_attempts <%= @ng_max_check_attempts %> + normal_check_interval <%= @ng_normal_check_interval %> + retry_check_interval <%= @ng_retry_check_interval %> + register <%= @ng_object_register %> + } +<% end -%> <% end -%> From a23722a67a2afb691ca41038faf5e20602a2cd02 Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Tue, 25 Jul 2017 19:56:39 +0200 Subject: [PATCH 2/2] recommit for updates in build 93 --- CHANGELOG.md | 10 + doc/_index.html | 2 +- doc/file.README.html | 2 +- doc/index.html | 2 +- doc/puppet_classes/cd_nagios.html | 2 +- .../cd_nagios_3A_3Acertbot_3A_3Acerts.html | 2 +- .../cd_nagios_3A_3Aclient_3A_3Atarget.html | 2 +- ...cd_nagios_3A_3Afirewall_3A_3Aiptables.html | 2 +- .../cd_nagios_3A_3Amain_3A_3Aconfig.html | 2 +- .../cd_nagios_3A_3Amain_3A_3Adirs.html | 2 +- .../cd_nagios_3A_3Amain_3A_3Ainstall.html | 2 +- .../cd_nagios_3A_3Amain_3A_3Auser.html | 2 +- ...A_3Anagios_3A_3Aobjects_3A_3Acommands.html | 2 +- ...gios_3A_3Aobjects_3A_3Atemplate_rules.html | 75 ++- doc/puppet_classes/cd_nagios_3A_3Aparams.html | 2 +- .../cd_nagios_3A_3Aselinux_3A_3Aconfig.html | 2 +- ..._nagios_3A_3Aserver_3A_3Aaccess_rules.html | 2 +- .../cd_nagios_3A_3Aserver_3A_3Afiles.html | 2 +- .../cd_nagios_3A_3Aserver_3A_3Aservice.html | 2 +- ..._3Anagios_3A_3Aobjects_3A_3Atemplates.html | 597 +++++++++++++++++- .../cd_nagios_3A_3Aserver_3A_3Aaccess.html | 2 +- doc/top-level-namespace.html | 2 +- 22 files changed, 662 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1aa3e04..c06976b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ Changelog of Git Changelog.

No issue

+445db500b3ab876 Jenkins Server 2017-07-25 16:15:39 +

+

recommit for updates in build 92

+ +

+b4e4ceb9b07cde4 Arne Teuke 2017-07-25 16:15:21 +

+

added parameter documentation

+ +

a3517b81e663a07 Jenkins Server 2017-07-25 16:13:43

recommit for updates in build 91

diff --git a/doc/_index.html b/doc/_index.html index 6d3e204..83e59cb 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -201,7 +201,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index c8390ba..078b03e 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -338,7 +338,7 @@ environments.

diff --git a/doc/index.html b/doc/index.html index 0c88fde..8d3596c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -338,7 +338,7 @@ environments.

diff --git a/doc/puppet_classes/cd_nagios.html b/doc/puppet_classes/cd_nagios.html index 5a159fc..612e56f 100644 --- a/doc/puppet_classes/cd_nagios.html +++ b/doc/puppet_classes/cd_nagios.html @@ -139,7 +139,7 @@ class cd_nagios { diff --git a/doc/puppet_classes/cd_nagios_3A_3Acertbot_3A_3Acerts.html b/doc/puppet_classes/cd_nagios_3A_3Acertbot_3A_3Acerts.html index 718f516..3d1152f 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Acertbot_3A_3Acerts.html +++ b/doc/puppet_classes/cd_nagios_3A_3Acertbot_3A_3Acerts.html @@ -230,7 +230,7 @@ class cd_nagios::certbot::certs ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html b/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html index 79d4e07..ac6d322 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html @@ -368,7 +368,7 @@ class cd_nagios::client::target ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html b/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html index 65a4529..860d1fc 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html +++ b/doc/puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html @@ -207,7 +207,7 @@ class cd_nagios::firewall::iptables ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html index f6bc446..a974abe 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html @@ -195,7 +195,7 @@ class cd_nagios::main::config ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html index f71b1ee..29f97e4 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html +++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html @@ -468,7 +468,7 @@ class cd_nagios::main::dirs ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html index 3b885e8..edd3806 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html +++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html @@ -235,7 +235,7 @@ class cd_nagios::main::install ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html index 78755d0..9a28605 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html +++ b/doc/puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html @@ -200,7 +200,7 @@ class cd_nagios::main::user ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acommands.html b/doc/puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acommands.html index 59ddc93..d320d4c 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acommands.html +++ b/doc/puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acommands.html @@ -595,7 +595,7 @@ class cd_nagios::nagios::objects::commands ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html b/doc/puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html index fc713bd..e4e21b9 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html +++ b/doc/puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html @@ -115,8 +115,7 @@ for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see www.gnu.org/licenses/. - }

+href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

@@ -127,10 +126,12 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

-

cd_nagios::objects::templates { $name:

+

cd_nagios::nagios::objects::templates { 'generic contact':

-
ng_template_object => 'service',
+
ng_template_object      => 'contact',
+ng_template_object_name =>  'generic-contact',
+}
@@ -142,7 +143,6 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.
 
 
-26
 27
 28
 29
@@ -170,10 +170,38 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.
 51
 52
 53
-54
+54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 -
# File 'manifests/nagios/objects/template_rules.pp', line 26
+        
# File 'manifests/nagios/objects/template_rules.pp', line 27
 
 class cd_nagios::nagios::objects::template_rules (
 
@@ -197,11 +225,38 @@ class cd_nagios::nagios::objects::template_rules (
       notify    =>  Service[$ng_service],
     }
 
-    # example rule 
-    cd_nagios::objects::templates { 'generic contact':
+    # basic templates
+    cd_nagios::nagios::objects::templates { 'generic contact':
       ng_template_object      => 'contact',
       ng_template_object_name =>  'generic-contact',
     }
+    cd_nagios::nagios::objects::templates { 'generic-host':
+      ng_template_object      =>  'host',
+      ng_template_object_name =>  'generic-host',
+    }
+    cd_nagios::nagios::objects::templates { 'linux-server':
+      ng_template_object      =>  'host',
+      ng_template_object_name =>  'linux-server',
+      ng_template_object_use  =>  'generic-host',
+      ng_notification_options =>  'd,u,r',
+    }
+    cd_nagios::nagios::objects::templates { 'windows-server':
+      ng_template_object      =>  'host',
+      ng_template_object_name =>  'windows-server',
+      ng_template_object_use  =>  'generic-host',
+      ng_notification_options =>  'd,u,r',
+    }
+    cd_nagios::nagios::objects::templates { 'generic-service':
+      ng_template_object      =>  'service',
+      ng_template_object_name =>  'generic-service',
+      ng_max_check_attempts   =>  '3',
+      ng_notification_options =>  'w,u,c,r',
+    }
+    cd_nagios::nagios::objects::templates { 'local-service':
+      ng_template_object      =>  'service',
+      ng_template_object_name =>  'generic-service',
+      ng_max_check_attempts   =>  '4',
+    }
   }
 }
@@ -211,7 +266,7 @@ class cd_nagios::nagios::objects::template_rules ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aparams.html b/doc/puppet_classes/cd_nagios_3A_3Aparams.html index 436d0ea..e8aabb4 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aparams.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aparams.html @@ -5557,7 +5557,7 @@ $ng_target_command = "${ng_conf_d_dir}/nagios_command.cfg" diff --git a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html index 48bb1d5..f6eed7a 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html @@ -249,7 +249,7 @@ class cd_nagios::selinux::config ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html index a2ad9b2..6100b63 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html @@ -195,7 +195,7 @@ class cd_nagios::server::access_rules ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html index faa7045..e20de0b 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html @@ -334,7 +334,7 @@ class cd_nagios::server::files ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html index 66952c0..755f07d 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html @@ -270,7 +270,7 @@ class cd_nagios::server::service ( diff --git a/doc/puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html b/doc/puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html index 4228bc2..5379fda 100644 --- a/doc/puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html +++ b/doc/puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html @@ -108,7 +108,9 @@ for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see www.gnu.org/licenses/.

+href="http://www.gnu.org/licenses">www.gnu.org/licenses/. +notifications. +for the defined service or host.

@@ -130,7 +132,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.

the object type for the templates. -valid options are contact, +Valid options are contact, host and service.

@@ -247,7 +249,7 @@ r = notify on host recoveries (UP states), f = notify when the host starts and stops flapping, -s = snotify when host or service scheduled downtime starts and +s = notify when host or service scheduled downtime starts and ends. n = none (the contact will not receive any type of host notifications).

@@ -315,6 +317,478 @@ definition, we do not want to register those.

+
  • + + ng_template_object_use + + + (string) + + + (defaults to: undef) + + + — +
    +

    Which template to use for a given +host or service definition, i.e. +generic-host, generic-service etc.

    +
    + +
  • + +
  • + + ng_notifications_enabled + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether notifications are enabled. +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_event_handler_enabled + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether event handlers are enabled. +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_flap_detection_enabled + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether flap detection is enabled. +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_failure_prediction_enabled + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether failure prediction is +enabled. Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_process_perf_data + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether to process performance data. +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_retain_status_information + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether to retain status +information. Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_retain_nonstatus_information + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether to retain non-status +information. Valid options are 0 +and 1.

    +
    + +
  • + +
  • + + ng_notification_period + + + (string) + + + (defaults to: '24x7') + + + — +
    +

    Which period in to send out

    +
    + +
  • + +
  • + + ng_notification_interval + + + (string) + + + (defaults to: '30') + + + — +
    +

    Whoe often (in minutes) we should +resend notifications for the current +status.

    +
    + +
  • + +
  • + + ng_check_period + + + (string) + + + (defaults to: '24x7') + + + — +
    +

    Which period in to run checks for the defined +object.

    +
    + +
  • + +
  • + + ng_check_interval + + + (string) + + + (defaults to: '5') + + + — +
    +

    How often in minutes to check the defined +object.

    +
    + +
  • + +
  • + + ng_retry_interval + + + (string) + + + (defaults to: '1') + + + — +
    +

    at what interval in minutes to schedule +retries for the defined object.

    +
    + +
  • + +
  • + + ng_max_check_attempts + + + (string) + + + (defaults to: '10') + + + — +
    +

    how often to check the defined object +maximal.

    +
    + +
  • + +
  • + + ng_notification_options + + + (string) + + + (defaults to: undef) + + + — +
    +

    see ng_service_notification_options +and +ng_host_notification_options.

    +
    + +
  • + +
  • + + ng_contact_groups + + + (string) + + + (defaults to: 'admins') + + + — +
    +

    contact groups for the defined oject. +Specified contact group must exit in +contact_groups

    +
    + +
  • + +
  • + + ng_active_checks_enabled + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether to enable active checks. +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_passive_checks_enabled + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether to enable passive checks. +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_parallelize_check + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether to parallelize checks +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_obsess_over_service + + + (string) + + + (defaults to: '1') + + + — +
    +

    Whether to obsess over the service. +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_check_freshness + + + (string) + + + (defaults to: '0') + + + — +
    +

    Whether to check freshness. +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_is_volatile + + + (string) + + + (defaults to: '0') + + + — +
    +

    Whether the service is volatile. +Valid options are 0 and +1.

    +
    + +
  • + +
  • + + ng_normal_check_interval + + + (string) + + + (defaults to: '10') + + + — +
    +

    How often to check the service +under normal conditions.

    +
    + +
  • + +
  • + + ng_retry_check_interval + + + (string) + + + (defaults to: '2') + + + — +
    +

    Re-check the service every x minutes +until a hard state can be determined.

    +
    + +
  • +
  • ng_host_notification_period @@ -328,6 +802,19 @@ definition, we do not want to register those.

  • +
  • + + ng_check_command + + + (Any) + + + (defaults to: 'check-host-alive') + + +
  • + @@ -338,33 +825,59 @@ definition, we do not want to register those.

     
     
    -53
    -54
    -55
    -56
    -57
    -58
    -59
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -68
    -69
    -70
    -71
    -72
    -73
    -74
    -75
    -76
    +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
    -
    # File 'manifests/nagios/objects/templates.pp', line 53
    +        
    # File 'manifests/nagios/objects/templates.pp', line 101
     
     define cd_nagios::nagios::objects::templates (
     $ng_template_object               = undef,
    @@ -376,6 +889,32 @@ $ng_host_notification_options     = 'd,u,r,f,s',
     $ng_service_notification_commands = 'notify-service-by-email',
     $ng_host_notification_commands    = 'notify-host-by-email',
     $ng_object_register               = '0',
    +$ng_template_object_use           = undef,
    +$ng_notifications_enabled         = '1',
    +$ng_event_handler_enabled         = '1',
    +$ng_flap_detection_enabled        = '1',
    +$ng_failure_prediction_enabled    = '1',
    +$ng_process_perf_data             = '1',
    +$ng_retain_status_information     = '1',
    +$ng_retain_nonstatus_information  = '1',
    +$ng_notification_period           = '24x7',
    +$ng_notification_interval         = '30',
    +$ng_check_period                  = '24x7',
    +$ng_check_interval                = '5',
    +$ng_retry_interval                = '1',
    +$ng_max_check_attempts            = '10',
    +$ng_check_command                 = 'check-host-alive',
    +$ng_notification_options          = undef,
    +$ng_contact_groups                = 'admins',
    +$ng_active_checks_enabled         = '1',
    +$ng_passive_checks_enabled        = '1',
    +$ng_parallelize_check             = '1',
    +$ng_obsess_over_service           = '1',
    +$ng_check_freshness               = '0',
    +$ng_is_volatile                   = '0',
    +$ng_normal_check_interval         = '10',
    +$ng_retry_check_interval          = '2',
    +
     
     ) {
     $ng_nagios_server       = $::cd_nagios::params::ng_nagios_server
    @@ -397,7 +936,7 @@ $ng_templates_rule_erb  = $::cd_nagios::params::ng_templates_rule_erb
     
     
           
    diff --git a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html
    index e207eba..84b7fad 100644
    --- a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html
    +++ b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html
    @@ -220,7 +220,7 @@ $ng_service       = $::cd_nagios::params::ng_service
     
     
           
    diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html
    index 0088636..22cdb75 100644
    --- a/doc/top-level-namespace.html
    +++ b/doc/top-level-namespace.html
    @@ -90,7 +90,7 @@