]> granicus.if.org Git - icinga2/commitdiff
configconvert: export all enable_* attributes
authorMichael Friedrich <michael.friedrich@netways.de>
Mon, 1 Jul 2013 16:31:22 +0000 (18:31 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 1 Jul 2013 16:31:22 +0000 (18:31 +0200)
tools/configconvert/Icinga2/ExportIcinga2Cfg.pm

index 54cb94eed1694650b792cd1145c8b283e6e538e3..cca1b5f37e9dbc2b0c3708b93653d41649c137b4 100644 (file)
@@ -385,7 +385,7 @@ sub dump_service_2x {
         dump_config_line($icinga2_cfg, "\tnotification_interval = $service_2x->{'notification_interval'},");
     }
     if(defined($service_2x->{'notifications_enabled'})) {
-        dump_config_line($icinga2_cfg, "\tnotifications_enabled = $service_2x->{'notifications_enabled'},");
+        dump_config_line($icinga2_cfg, "\tenable_notifications = $service_2x->{'notifications_enabled'},");
     }
 
     if(defined($service_2x->{'__I2CONVERT_NOTIFICATION_FILTERS'})) {
@@ -423,6 +423,16 @@ sub dump_service_2x {
         dump_config_line($icinga2_cfg, "\tvolatile = $service_2x->{'volatile'},");
     }
 
+    if(defined($service_2x->{'active_checks_enabled'})) {
+        dump_config_line($icinga2_cfg, "\tenable_active_checks = $service_2x->{'active_checks_enabled'},");
+    }
+    if(defined($service_2x->{'passive_checks_enabled'})) {
+        dump_config_line($icinga2_cfg, "\tenable_passive_checks = $service_2x->{'passive_checks_enabled'},");
+    }
+    if(defined($service_2x->{'flap_detection_enabled'})) {
+        dump_config_line($icinga2_cfg, "\tenable_flapping = $service_2x->{'flap_detection_enabled'},");
+    }
+
     ####################################################
     # custom attr
     ####################################################
@@ -567,7 +577,7 @@ sub dump_host_2x {
         dump_config_line($icinga2_cfg, "\tnotification_interval = $host_2x->{'notification_interval'},");
     }
     if(defined($host_2x->{'notifications_enabled'})) {
-        dump_config_line($icinga2_cfg, "\tnotifications_enabled = $host_2x->{'notifications_enabled'},");
+        dump_config_line($icinga2_cfg, "\tenable_notifications = $host_2x->{'notifications_enabled'},");
     }
 
     ####################################################
@@ -586,6 +596,16 @@ sub dump_host_2x {
         dump_config_line($icinga2_cfg, "\tcheck_period = \"$host_2x->{'check_period'}\",");
     }
 
+    if(defined($host_2x->{'active_checks_enabled'})) {
+        dump_config_line($icinga2_cfg, "\tenable_active_checks = $host_2x->{'active_checks_enabled'},");
+    }
+    if(defined($host_2x->{'passive_checks_enabled'})) {
+        dump_config_line($icinga2_cfg, "\tenable_passive_checks = $host_2x->{'passive_checks_enabled'},");
+    }
+    if(defined($host_2x->{'flap_detection_enabled'})) {
+        dump_config_line($icinga2_cfg, "\tenable_flapping = $host_2x->{'flap_detection_enabled'},");
+    }
+
     ####################################################
     # custom attr
     ####################################################
@@ -726,7 +746,7 @@ sub dump_host_2x {
             dump_config_line($icinga2_cfg, "\t\tnotification_interval = $service_2x->{'notification_interval'},");
         }
         if(defined($service_2x->{'notifications_enabled'})) {
-            dump_config_line($icinga2_cfg, "\tnotifications_enabled = $service_2x->{'notifications_enabled'},");
+            dump_config_line($icinga2_cfg, "\tenable_notifications = $service_2x->{'notifications_enabled'},");
         }
 
         ####################################################
@@ -745,6 +765,16 @@ sub dump_host_2x {
             dump_config_line($icinga2_cfg, "\tcheck_period = \"$service_2x->{'check_period'}\",");
         }
 
+        if(defined($service_2x->{'active_checks_enabled'})) {
+            dump_config_line($icinga2_cfg, "\t\tenable_active_checks = $service_2x->{'active_checks_enabled'},");
+        }
+        if(defined($service_2x->{'passive_checks_enabled'})) {
+            dump_config_line($icinga2_cfg, "\t\tenable_passive_checks = $service_2x->{'passive_checks_enabled'},");
+        }
+        if(defined($service_2x->{'flap_detection_enabled'})) {
+            dump_config_line($icinga2_cfg, "\t\tenable_flapping = $service_2x->{'flap_detection_enabled'},");
+        }
+
         ####################################################
         # custom attr
         ####################################################