mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
parent
00532f6da7
commit
e236894de9
@ -345,9 +345,9 @@ sub dump_service_2x {
|
|||||||
#say Dumper($service_2x->{'servicegroups'});
|
#say Dumper($service_2x->{'servicegroups'});
|
||||||
my $servicegroups = join '", "', @{$service_2x->{'servicegroups'}};
|
my $servicegroups = join '", "', @{$service_2x->{'servicegroups'}};
|
||||||
if ($service_2x->{'__I2_CONVERT_SG_ADD'} == 1) {
|
if ($service_2x->{'__I2_CONVERT_SG_ADD'} == 1) {
|
||||||
dump_config_line($icinga2_cfg, "\tservicegroups += [ \"$servicegroups\" ],");
|
dump_config_line($icinga2_cfg, "\tgroups += [ \"$servicegroups\" ],");
|
||||||
} else {
|
} else {
|
||||||
dump_config_line($icinga2_cfg, "\tservicegroups = [ \"$servicegroups\" ],");
|
dump_config_line($icinga2_cfg, "\tgroups = [ \"$servicegroups\" ],");
|
||||||
}
|
}
|
||||||
#say Dumper($service_description);
|
#say Dumper($service_description);
|
||||||
#say Dumper($service_2x->{'servicegroups'});
|
#say Dumper($service_2x->{'servicegroups'});
|
||||||
@ -538,9 +538,9 @@ sub dump_host_2x {
|
|||||||
if(defined($host_2x->{'hostgroups'})) {
|
if(defined($host_2x->{'hostgroups'})) {
|
||||||
my $hostgroups = join '", "', @{$host_2x->{'hostgroups'}};
|
my $hostgroups = join '", "', @{$host_2x->{'hostgroups'}};
|
||||||
if ($host_2x->{'__I2_CONVERT_HG_ADD'} == 1) {
|
if ($host_2x->{'__I2_CONVERT_HG_ADD'} == 1) {
|
||||||
dump_config_line($icinga2_cfg, "\thostgroups += [ \"$hostgroups\" ],");
|
dump_config_line($icinga2_cfg, "\tgroups += [ \"$hostgroups\" ],");
|
||||||
} else {
|
} else {
|
||||||
dump_config_line($icinga2_cfg, "\thostgroups = [ \"$hostgroups\" ],");
|
dump_config_line($icinga2_cfg, "\tgroups = [ \"$hostgroups\" ],");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -692,9 +692,9 @@ sub dump_host_2x {
|
|||||||
#say Dumper($service_2x->{'servicegroups'});
|
#say Dumper($service_2x->{'servicegroups'});
|
||||||
my $servicegroups = join '", "', @{$service_2x->{'servicegroups'}};
|
my $servicegroups = join '", "', @{$service_2x->{'servicegroups'}};
|
||||||
if ($service_2x->{'__I2_CONVERT_SG_ADD'} == 1) {
|
if ($service_2x->{'__I2_CONVERT_SG_ADD'} == 1) {
|
||||||
dump_config_line($icinga2_cfg, "\t\tservicegroups += [ \"$servicegroups\" ],");
|
dump_config_line($icinga2_cfg, "\t\tgroups += [ \"$servicegroups\" ],");
|
||||||
} else {
|
} else {
|
||||||
dump_config_line($icinga2_cfg, "\t\tservicegroups = [ \"$servicegroups\" ],");
|
dump_config_line($icinga2_cfg, "\t\tgroups = [ \"$servicegroups\" ],");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -993,6 +993,11 @@ sub dump_notification_2x {
|
|||||||
dump_config_line($icinga2_cfg, "\tusers = [ \"$service_users\" ],");
|
dump_config_line($icinga2_cfg, "\tusers = [ \"$service_users\" ],");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(defined($notification_2x->{'usergroups'}) && @{$notification_2x->{'usergroups'}} > 0) {
|
||||||
|
my $service_usergroups = join '", "', @{$notification_2x->{'usergroups'}};
|
||||||
|
dump_config_line($icinga2_cfg, "\tusergroups = [ \"$service_usergroups\" ],");
|
||||||
|
}
|
||||||
|
|
||||||
# this is set for escalations
|
# this is set for escalations
|
||||||
if(defined($notification_2x->{'__I2CONVERT_NOTIFICATION_TIMES'}) && $notification_2x->{'__I2CONVERT_NOTIFICATION_TIMES'} != 0) {
|
if(defined($notification_2x->{'__I2CONVERT_NOTIFICATION_TIMES'}) && $notification_2x->{'__I2CONVERT_NOTIFICATION_TIMES'} != 0) {
|
||||||
dump_config_line($icinga2_cfg, "\ttimes = {");
|
dump_config_line($icinga2_cfg, "\ttimes = {");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user