[icinga-checkins] icinga.org: icinga2/feature/configconvert-2743: configconvert: export check_period for hosts/services

git at icinga.org git at icinga.org
Fri May 3 13:45:10 CEST 2013


Module: icinga2
Branch: feature/configconvert-2743
Commit: 4660d1cb753d82f90c3f71115ea3c417dd1ed43c
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=4660d1cb753d82f90c3f71115ea3c417dd1ed43c

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Fri May  3 13:44:43 2013 +0200

configconvert: export check_period for hosts/services

refs #2743

---

 contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm b/contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm
index d03afcd..82b1dd9 100644
--- a/contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm
+++ b/contrib/configconvert/Icinga2/ExportIcinga2Cfg.pm
@@ -341,6 +341,10 @@ sub dump_service_2x {
         dump_config_line($icinga2_cfg, "\tmax_check_attempts = $service_2x->{'max_check_attempts'},");
     }
 
+    if(defined($service_2x->{'check_period'})) {
+        dump_config_line($icinga2_cfg, "\tcheck_period = \"$service_2x->{'check_period'}\",");
+    }
+
     if(defined($service_2x->{'action_url'})) {
         dump_config_line($icinga2_cfg, "\taction_url = \"$service_2x->{'action_url'}\",");
     }
@@ -472,6 +476,10 @@ sub dump_host_2x {
         dump_config_line($icinga2_cfg, "\tmax_check_attempts = $host_2x->{'max_check_attempts'},");
     }
 
+    if(defined($host_2x->{'check_period'})) {
+        dump_config_line($icinga2_cfg, "\tcheck_period = \"$host_2x->{'check_period'}\",");
+    }
+
     if(defined($host_2x->{'action_url'})) {
         dump_config_line($icinga2_cfg, "\taction_url = \"$host_2x->{'action_url'}\",");
     }
@@ -606,6 +614,10 @@ sub dump_host_2x {
             dump_config_line($icinga2_cfg, "\t\tmax_check_attempts = $service_2x->{'max_check_attempts'},");
         }
 
+        if(defined($service_2x->{'check_period'})) {
+            dump_config_line($icinga2_cfg, "\tcheck_period = \"$service_2x->{'check_period'}\",");
+        }
+
         if(defined($service_2x->{'action_url'})) {
             dump_config_line($icinga2_cfg, "\t\taction_url = \"$service_2x->{'action_url'}\",");
         }





More information about the icinga-checkins mailing list