From 6094321d4f0cebbb2460f8f591a679ef2c8f9f0f Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Wed, 26 Jul 2017 14:04:39 +0100 Subject: [PATCH] sorted deprecated syntax --- manifests/nagios/objects/template_rules.pp | 1 + manifests/nagios/objects/templates.pp | 8 ++++---- templates/nagios/templates_cfg_rule.erb | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/manifests/nagios/objects/template_rules.pp b/manifests/nagios/objects/template_rules.pp index bc1ddbe..6b859d5 100644 --- a/manifests/nagios/objects/template_rules.pp +++ b/manifests/nagios/objects/template_rules.pp @@ -96,6 +96,7 @@ class cd_nagios::nagios::objects::template_rules ( ng_template_object => 'service', ng_template_object_name => 'local-service', ng_max_check_attempts => '4', + ng_template_object_use => 'generic-service', } } } diff --git a/manifests/nagios/objects/templates.pp b/manifests/nagios/objects/templates.pp index 5f04474..34cf0df 100644 --- a/manifests/nagios/objects/templates.pp +++ b/manifests/nagios/objects/templates.pp @@ -94,9 +94,9 @@ # 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 +# @param [string] ng_check_interval How often to check the service # under normal conditions. -# @param [string] ng_retry_check_interval Re-check the service every x minutes +# @param [string] ng_retry_interval Re-check the service every x minutes # until a hard state can be determined. ################################################################################ define cd_nagios::nagios::objects::templates ( @@ -131,8 +131,8 @@ $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_check_interval = '10', +$ng_retry_interval = '2', ) { diff --git a/templates/nagios/templates_cfg_rule.erb b/templates/nagios/templates_cfg_rule.erb index 7d1208b..87042ce 100644 --- a/templates/nagios/templates_cfg_rule.erb +++ b/templates/nagios/templates_cfg_rule.erb @@ -110,8 +110,8 @@ define <%= @ng_template_object %>{ 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 %> + check_interval <%= @ng_check_interval %> + retry_interval <%= @ng_retry_interval %> contact_groups <%= @ng_contact_groups %> notification_interval <%= @ng_notification_interval %> notification_period <%= @ng_notification_period %> @@ -123,8 +123,8 @@ 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 %> + check_interval <%= @ng_check_interval %> + retry_interval <%= @ng_retry_interval %> register <%= @ng_object_register %> } <% end -%>