mirror of https://github.com/Icinga/icinga2.git
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cef1a6856a
|
@ -203,24 +203,41 @@ sub dump_groups_2x {
|
|||
|
||||
start_object_type_config_dump($icinga2_cfg, 'groups');
|
||||
|
||||
if (!@$cfg_obj_2x{'hostgroup'}) {
|
||||
goto SKIP_HOSTGROUPS;
|
||||
}
|
||||
|
||||
foreach my $hostgroup_2x_key (keys %{@$cfg_obj_2x{'hostgroup'}}) {
|
||||
my $hostgroup_2x = @$cfg_obj_2x{'hostgroup'}->{$hostgroup_2x_key};
|
||||
|
||||
Icinga2::ExportIcinga2Cfg::dump_group_2x($icinga2_cfg, $hostgroup_2x);
|
||||
}
|
||||
|
||||
SKIP_HOSTGROUPS:
|
||||
|
||||
if (!@$cfg_obj_2x{'servicegroup'}) {
|
||||
goto SKIP_SERVICEGROUPS;
|
||||
}
|
||||
|
||||
foreach my $servicegroup_2x_key (keys %{@$cfg_obj_2x{'servicegroup'}}) {
|
||||
my $servicegroup_2x = @$cfg_obj_2x{'servicegroup'}->{$servicegroup_2x_key};
|
||||
|
||||
Icinga2::ExportIcinga2Cfg::dump_group_2x($icinga2_cfg, $servicegroup_2x);
|
||||
}
|
||||
|
||||
SKIP_SERVICEGROUPS:
|
||||
|
||||
if (!@$cfg_obj_2x{'usergroup'}) {
|
||||
goto SKIP_USERGROUPS;
|
||||
}
|
||||
|
||||
foreach my $usergroup_2x_key (keys %{@$cfg_obj_2x{'usergroup'}}) {
|
||||
my $usergroup_2x = @$cfg_obj_2x{'usergroup'}->{$usergroup_2x_key};
|
||||
|
||||
Icinga2::ExportIcinga2Cfg::dump_group_2x($icinga2_cfg, $usergroup_2x);
|
||||
}
|
||||
|
||||
SKIP_USERGROUPS:
|
||||
end_object_type_config_dump($icinga2_cfg);
|
||||
}
|
||||
|
||||
|
|
|
@ -284,6 +284,7 @@ sub parse_icinga1_objects {
|
|||
my $cfg_objs = {};
|
||||
|
||||
foreach my $cfg_file (@cfg_files) {
|
||||
print "Processing file '$cfg_file'...\n";
|
||||
$cfg_objs = parse_icinga1_object_cfg($cfg_objs, $cfg_file);
|
||||
}
|
||||
|
||||
|
|
|
@ -87,9 +87,9 @@ sub slurp {
|
|||
<$fh>;
|
||||
}
|
||||
} elsif (! -r $file) {
|
||||
die "$file not readable. check permissions/user!"
|
||||
print " ERROR: $file not readable. check permissions/user!\n"
|
||||
} else {
|
||||
die "$file does not exist";
|
||||
print " ERROR: $file does not exist\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue